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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
i deployed api and hub on my remote server and host hub using pm2 domains are as follow
http://myshop-api.lusites.xyz (laravel api)
http://myshop-ui.lusites.xyz (Nuxt app)
after login i can get data from http://myshop-api.lusites.xyz/api/v1/users/current?include=customer.customerGroups,roles.permissions api but after that cors error is hited screenshort is attached bellow
console error
Access to XMLHttpRequest at 'http://myshop-api.lusites.xyz/api/v1/' from origin 'http://myshop-ui.lusites.xyz' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.
this is my env params
SANCTUM_STATEFUL_DOMAINS = '.lusites.xyz,myshop-ui.lusites.xyz:3000,myshop-ui.lusites.xyz,myshop-api.lusites.xyz,localhost:3000,localhost,127.0.0.1,127.0.0.1:8000,::1
SESSION_DOMAIN=".lusites.xyz"
SESSION_DRIVER='cookie'
my config/cors.php
I'm stuck here, could you please help me ?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions