You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is a scenario like this:
The url in javascript of frontend is "http://localhost:8888/thedata",
And the url in gin is "http://localhost:8888/thedata/", Please notice the slash sign in the end ,
Then, the browser will reports a CORS error. It's been bothering me for a long time. I couldn't find an explanation for this on Google. Am I the only one who has found this problem?
The text was updated successfully, but these errors were encountered:
in Gin, it will result in a Moved permanently response from the server.
I think this issue is more related to Gin than the CORS module here but I might be wrong
I think CORS module doesn't support redirection .
I made the same mistake by leaving a slash at the end of the url, it shows CORS issue. I have tried different configuration of CORS module with no success as if my config isn't running. I altred the origin value of the request with gin server url the result was a redirection and a success. So that made me think that CORS module doesn't support redirection.
If there is a scenario like this:
The url in javascript of frontend is "http://localhost:8888/thedata",
And the url in gin is "http://localhost:8888/thedata/", Please notice the slash sign in the end ,
Then, the browser will reports a CORS error. It's been bothering me for a long time. I couldn't find an explanation for this on Google. Am I the only one who has found this problem?
The text was updated successfully, but these errors were encountered: