Blocked loading mixed active content

im using filament3, i have no errors in local enviroment but i'm getting following errors in production and some components are not fully loaded.
21 Replies
Dennis Koch
Dennis Koch2y ago
Sounds like you are hosting on https:// but load assets from http://. Check your APP_URL
msalehi
msalehiOP2y ago
i already used https:// in my APP_URL
Dennis Koch
Dennis Koch2y ago
Did you set an ASSET_URL or similar?
msalehi
msalehiOP2y ago
no i've not set ASSET_URL in my .env
LeandroFerreira
check #✅┊rules
No description
msalehi
msalehiOP2y ago
Thanks a lot everyone .. my problem solved .
Dennis Koch
Dennis Koch2y ago
What was the issue?
msalehi
msalehiOP2y ago
It was because of my ASSET_URL that was not set in my .env i've set that and solved.
Dennis Koch
Dennis Koch2y ago
You shouldn't need one if APP_URL is the same 🤔
msalehi
msalehiOP2y ago
No description
Dennis Koch
Dennis Koch2y ago
Weird.
msalehi
msalehiOP2y ago
maybe it's cause of nginx or something else ?
binaryfire
binaryfire2y ago
@Mohammad Salehi Are you behind a reverse proxy like Cloudflare? If so, you need to enable and configure the TrustProxies middleware. Otherwise the https connection won’t be detected and your asset urls will be http
msalehi
msalehiOP2y ago
yeah, but the problem of components fixed and now my uploader component throws 401 error .. i'm using laravel 10 and octane with swoole and nginx ..
binaryfire
binaryfire2y ago
So you are using a reverse proxy?
msalehi
msalehiOP2y ago
yeah. i set the forceScheme in my AppServiceProvider to use https in my production . i also set the $proxies = '*' in TrustProxies
binaryfire
binaryfire2y ago
Have you set up the TrustProxies middleware?
msalehi
msalehiOP2y ago
yeah
binaryfire
binaryfire2y ago
Ah ok. Weird that you'd need to force it. It should be autodetected
msalehi
msalehiOP2y ago
all of the middlewares are default . i was not changed any middleware. this is my upload url from browser console : https://blog.mediaverse.land/livewire/upload-file?expires=1697809949&signature=721efeada86607d7f5e5fa5e0f02743a8de74c59553c5e9841d9937fd22ac1db

Did you find this page helpful?