inertia-laravel
inertia-laravel copied to clipboard
subfission/Cas and CORS
trafficstars
I'm using Subfission/CAS to authenticate users through middleware in Laravel:
if (!cas()->checkAuthentication()) cas->authenticate();
All works fine until use Link component or partial reloads and cas session has expired. Then get CORS error:
Access to XMLHttpRequest at '...' (redirected from '...') from origin '...' 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.
Any idea how I can avoid the error?