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
@pi0 What about enabling cors in general? I created another thread under Nuxt and the suggested approach was to create a Nitro plugin. I could however not get it to work the same way it works for express.
This is the code that works with an express server (notice the origin value set to localhost:3100). The client can access the end points just fine:
The corresponding Nitro plugin does not work. Maybe I messed up somewhere? The client app compains that the origin is set to '*' even though I set it to localhost:
Activity
ahku commentedon Apr 20, 2022
@pi0 What about enabling cors in general? I created another thread under Nuxt and the suggested approach was to create a Nitro plugin. I could however not get it to work the same way it works for express.
This is the code that works with an express server (notice the origin value set to localhost:3100). The client can access the end points just fine:
The corresponding Nitro plugin does not work. Maybe I messed up somewhere? The client app compains that the origin is set to '*' even though I set it to localhost:
Any help would be appreciated.
pi0 commentedon Apr 20, 2022
We can globally enable it with routing rules too:
gluharry commentedon May 27, 2022
Hey, is there any development on this?
I am also struggling with cors and the options method.