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
i already specify the origin to my localhost domain but it wont work and i also have experimented in my frontend code to put no-cors but still no result. Please help me out
The text was updated successfully, but these errors were encountered:
Hi @Dancingaroundthelies , so I was having the same problem, after a few cups of coffee and some lost threads, I found the solution, if you have more than one middleware in your application, after your function r := gin.New() or r := gin.Default() you need to register the cors middleware first of all, this worked for me, if I register it after some middleware, the cors doesn't work, for example
so i have a project that use both nextjs and golang as its frontend and backend. I keep getting blocked from fetching my data because of CORS
this is my cors code on the backend :
i already specify the origin to my localhost domain but it wont work and i also have experimented in my frontend code to put no-cors but still no result. Please help me out
The text was updated successfully, but these errors were encountered: