I am currently getting a CORS message in my console on my subdomains
Access to script at 'https://cyber.com/js/filament/forms/components/select.js?v=3.2.131.0'
from origin 'https://is.cyber.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
14 Replies
That is because you are loading scripts from different domains... You need to update your CORS Policy to allow access to sub domains.
how to do it palse ,
this problem in cloud just ,A Local it is working with laragon
Laragon doesn't set CORS. your server is likely setting CORS. You can use AI to help with setting server CORS, I suspect you are running NGINX, just paste in your nginx config and ask AI to fix this error.
I had the same problem a couple months ago and It solved by putting this in the env file:
SESSION_DOMAIN='.cyber.com'
APP_DOMAIN='cyber.com'
and then run:
Thats what I had to do to make filament with sub domain tenancy work.
APP_DOMAIN
or APP_URL?
both
app_url includes the protocol http or https
in the session domain the "." needs to be there, it's not a typo
Is like this
it's missing the APP_DOMAIN
now?
looks right
now you need to test it
Tenancy for Laravel
Automatic & flexible multi-tenancy package for Laravel.
Automatically turn any Laravel application multi-tenant — no code changes needed. stancl/tenancy automatically switches database connections and all other things in the background, letting you leverage standard Laravel code into a full SaaS application. Most features out of all multi-tenancy packages. Single & multi-database tenancy.
hmm then I don't know
ok ,why layout like this
it worked for me with filament built in multi tenancy, if isnt working for you you can revert it.