Next.js Discord

Discord Forum

Cross-Origin Request Blocked

Answered
Swedish Lapphund posted this in #help-forum
Open in Discord
Swedish LapphundOP
So whenever I have NODE_TLS_REJECT_UNAUTHORIZED set to 0 everything works fine, however when I do not I get the follow error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://localhost:8081/auth/token/refresh. (Reason: CORS request did not succeed). Status code: (null).
Answered by Swedish Lapphund
seems like I didnt have the right order in my backend
View full answer

4 Replies

Swedish LapphundOP
Now my backend is ASP.net, and there I do: UseCors("AllowAll")
I am not behind a proxy
Swedish LapphundOP
Swedish LapphundOP
seems like I didnt have the right order in my backend
Answer