-
Notifications
You must be signed in to change notification settings - Fork 16
Cors policy error running poc-ipfs locally #6
Comments
The |
Thanks, it works now but had to edit the .\dist\data\config.local.json and not the one in .\src\data\ as stated in the doc I'm now facing another error, after the upload submission I get a json response with {"success":false,"message":"TypeError: Cannot read property '1' of null"} no further detail in the logs |
You edit the one in I added an extra catch for that error fce4c4b, it is caused by the format of the IPFS provider being incorrect, it should be in the form |
Have some time now for try to run this poc...thanks for the clarification about the build step, I got over the CORS issue. I thought that the dynamoDbConnection parameters were something optional but that not the case... This is something would be nice to have explained in the doc imho |
Yes as you inferred the dynamodb acts as a caching proxy for the transactions, so that if removed during a snapshot everything still works. The ideal implementation is to have a permanode and then the dynamodb part is not necessary for storing transaction data. The dynamodb is also used to save some state of the services. |
Can you answer why I have a CORS problem when I want to retrieve a file.like this, "Access to XMLHttpRequest at 'http://localhost:8080' from origin 'http://localhost:3000' has been blocked by CORS policy". My ipfsGateway is 'http://localhost:8080/ipfs/:hash'?How can I solve this? |
There must be some kind of CORS config required for IPFS, see a similar issue for ipfs ipfs/kubo#2239 |
Thanks, I forgot to set the ipfsGateway to allow cross domain. |
Thanks for clarifying that out @obany, I'll keep in mind to give a look to permanodes development and in the meantime try to run the poc with the actual setup |
What is the correct aws endpoit for the 'region' parameter in the dynamodbconnection setup? But i get this error: |
its just the plain region part |
I'm trying to run the poc on my local machine, followed the doc for the client and the api,
As I try to upload a file I get this error:
"Access to XMLHttpRequest at 'http://localhost:4000/ipfs' from origin 'http://localhost:3000' has been blocked by CORS policy:"
Now I'm aware about cross domain ajax requests and understand the underlying security issue.
But right now both scripts are running locally, so they should be able to communicate...or I'm missing something?
my config files for api and client are the following:
{ "node": { "provider": "https://nodes.thetangle.org:443", "depth": 3, "mwm": 9 }, "ipfs": { "provider": "cloudflare-ipfs.com", "token": "MYIPFSNODE_TOKEN" }, "dynamoDbConnection": { "region": "AWS-REGION", "accessKeyId": "AWS-ACCESS-KEY-ID", "secretAccessKey": "AWS-SECRET-ACCESS-KEY", "dbTablePrefix": "DATABASE-TABLE-PREFIX" }, "allowedDomains": [ "https://ipfs.iota.works", "https://ipfs.iota.org", "cloudflare-ipfs.com" ] }
{ "apiEndpoint": "http://localhost:4000/", "ipfsGateway": "https://ipfs.io/ipfs/:hash", "tangleExplorer": { "transactions": "https://utils.iota.org/transaction/:transactionHash", "bundles": "https://utils.iota.org/bundle/:bundleHash" }, "googleAnalyticsId": "" }
The text was updated successfully, but these errors were encountered: