Amin
Amin
KKinde
Created by Amin on 5/31/2024 in #💻┃support
next.js 14 hostinger vps nginx pm2 - CORS related issues
I have been stuck on this same issue for days now. I cant seem to ficgure out what im doing wrong. but whenever i login to my app it correctly redirects me to /dashboard but when i click on a sublink i.e. /dashboard/edit the app wont be able to see my user session anymore. this is the error i get right after logging in (in browser console): dashboard:1 Access to fetch at 'https://housifa.com/' (redirected from 'https://housifa.com/api/auth/logout?_rsc=1538b') from origin 'https://housifa.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
3 replies