How to enable cors for pusher
I have this setting for routeRules:
export default defineNuxtConfig({
routeRules; {
'/': {
cors:true,
headers: { 'Access-Control-Allow-Origin' : '' }
},
'/**': {
cors:true,
headers: { 'Access-Control-Allow-Origin' : '' }
},
}
})
I still get this in the console"
Pusher support is still saying I have to enable cors.
What should I do? I'm getting crazy since 2 days.
4 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I'm using Nitro, that is the default server on Nuxt 3. How do I add headers to pusher? Shouldn't they do that??
There should be something really easy that I'm missing here. I don't get how I'm supposed to set headers for a server that is not under my control.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Resolved. Cors was ok. I was missing some env variables in production 😬
Thank you for your help