CORS nightmare
Hi everyone. I am currently developing a chrome extension, where I am fetching data from my nextjs api. The main problem here is that when I try to fetch data, I am getting a cors error, due to the extension’s origin being “null”.
Does anyone know how to get the chrome extension to send its origin to the server?
Chrome extension:
Nextjs Middleware:
1 Reply
Add this to your header
This isn't nextjs but you should know how to translate it
Also for me cors: *
Didn't work so i had to explicitly put in the orgin domains and do some regex stuff