Skip to content

Allowed CORS Origins form: how to use properly? Curious about CORS errors. #3907

Discussion options

You must be logged in to vote

Thanks for the detailed explanation!

Hmmm, the external api needs to include the "Access-Control-Allow-Origin" header in the response.

For example, https://my-hub.com makes a request to https://i-heart-my-api.com (or any request). https://i-heart-my-api.com response needs to have Access-Control-Allow-Origin: https://my-hub.com in the header of the response.

For a recent project of mine, using Socket.io on my local environment. The reason I need the "Access-Control-Allow-Origin" header is because my server is running on http://localhost:3000 and hubs is running on https://hubs.local:8080 or https://localhost:8080.

In my server code, I configure my socket to include the "Access-Control-Allo…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@matthewbcool
Comment options

@robinkwilson
Comment options

@matthewbcool
Comment options

@jbshin-gemiso
Comment options

@AVTPJ
Comment options

Answer selected by pattersonbl2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants