CORS problem when switching to HTTPS for local dev
I have changed
.env
to https://localhost
Using Caddy as reverse proxy.
I have pushed this build to production and worked perfectly with https and filament.
so something with https and localhost6 Replies
Usually
.env
should be enough.
You cleared the config cache?
You don't have a ASSET_URL
, do you?
If nothing helps URL::forceScheme('https)
in a ServiceProvider is the last resortI've not set ASSET_URL, should I?
I think if it's unset it should use
APP_URL
as a defaultI'll try URL::forceScheme('https)
?
The closing
'
is missing but otherwise yesthe reason I installed HTTPS on localhost
is because
when I put my laravel server behind reverse_proxy (caddy)
file uploads started saying 'CSRF mismatch error'
so I thought, since it worked perfectly in production
I'll just try http on localhost
but, now when I try to upload a file, I'm getting 401 unauthorized
BUT it seems the CSRF problem is fixed