RTradeLtd / Temporal

☄️ Temporal is an easy-to-use, enterprise-grade interface into distributed and decentralized storage
https://temporal.cloud
MIT License
227 stars 40 forks source link

CORS on Chrome #424

Closed DallasC closed 4 years ago

DallasC commented 4 years ago

Describe the bug When sending a request to the ipfs http api from a chrome browser you get the following CORS error:

Access to fetch at 'https://dev.api.ipfs.temporal.cloud/api/v0/add?stream-channels=true' from origin 'http://localhost:3000' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:3000, *', but only one is allowed. Have the server send the header with a valid value, or, if an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

It appears that the header is being assigned twice and should just be assigned *.

To Reproduce Steps to reproduce the behavior:

  1. send a request from a chrome browser to /api/v0/add endpoint
  2. In the Developer Tools Console in the browser
  3. Scroll down to '....'
  4. See error

Screen Shots Response headers Screen Shot 2019-12-23 at 3 25 30 PM

Console Warning Screen Shot 2019-12-23 at 3 30 35 PM

Additional context This does not appear to be an issue with Firefox which I can still get a 200 Ok response code. I have not tested on other browsers yet.

bonedaddy commented 4 years ago

solved with latest release of warp