Mixed Content LARAVEL PROJECT

Hi, i deployed a laravel 10 project. Some resources gets loaded over http istead of https. I also updated the APP_URL in .env from http://localhost to https:// but nothing. Thanks
8 Replies
Percy
Percy2y ago
Project ID: 934db408-cf4c-42af-ab28-4418274abd65
Eureka
EurekaOP2y ago
934db408-cf4c-42af-ab28-4418274abd65
Brody
Brody2y ago
make the requests with https
Eureka
EurekaOP2y ago
the http resources gets generated by railway
Brody
Brody2y ago
no they don't they would get generated by your app
Eureka
EurekaOP2y ago
server: { https: true, host: '0.0.0.0', hmr: { host: 'localhost' }, update vite config with this maybe?
Brody
Brody2y ago
didn't know vite could have anything to do with laravel
njoguamos
njoguamos2y ago
Try adding this to your AppServiceProvider boot() Method.
if (app()->environment('production')) {
\Illuminate\Support\Facades\URL::forceScheme('https');
}
if (app()->environment('production')) {
\Illuminate\Support\Facades\URL::forceScheme('https');
}
Want results from more Discord servers?
Add your server