How to not send cookie header
See original GitHub issueEnvironment
- Operating System:
Linux
- Node Version:
v16.16.0
- Nuxt Version:
3.0.0-rc.10
- Nitro Version:
0.5.4
- Package Manager:
npm@8.11.0
- Builder:
vite
- User Config:
-
- Runtime Modules:
-
- Build Modules:
-
Reproduction
Describe the bug
I have a backend on django(the same domain but it has /api prefix) and client app on nuxt 3 I need ssr and I run pm2 for client app (just for the sake of ssr and dynamic content) currently when I make request to my backend it sends all cookies I use. (I use cookies with persistedstate) it attaches everything. if I set ssr:false it is not sending cookie header
- how to prevent sending cookies in request headers ?
- if I use baseUrl and set different domain for that, it doesnt send cookies
- I have problems on backend regarding to this as well. I shouldnt send cookies.
- I dont need servers/api servers/middleware at all. I also get warnings regarding it cant find a route I spent a lot of time to find out the solution for this problem but I couldnt find. please help
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Is it possible to prevent cookies to be sent in every HTTP ...
So if you make a first request that return cookies, you need to explicit read them, hold them locally somewhere, and eventually put...
Read more >How do you prevent sending cookie data over HTTP the first ...
Set up your site to redirect from HTTP to HTTPS, and start sending Strict-Transport-Security headers. (You don't have to go for preload ...
Read more >Using HTTP cookies - MDN Web Docs
After receiving an HTTP request, a server can send one or more Set-Cookie headers with the response. The browser usually stores the cookie...
Read more >7 Keys to the Mystery of a Missing Cookie - Medium
Check out the OPTIONS response header ACCESS-CONTROL-ALLOW-CREDENTIAL whether it is set to true . If the server doesn't allow credentials being ...
Read more >Using cookies - Postman Learning Center
You can't override cookie headers directly in the Headers tab. Edit the cookie in the cookie manager, or delete the cookie and set...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have you tried adding
{ credentials: "omit" }
to useFetch options?Have you accidentally added it to your headers? You should do it like: