F
Filamentβ€’12mo ago
Sanchit Patil

Ngnix not loading dynamic assets in production

#offtopic Does anyone have any idea about the issue of ngnix not loading assets (image files) in production (nginx) these files are from the phone-input plugin
// routes from the plugin code
Route::get('/phone-input-flags.png', function () {
return response()->file(__DIR__.'/../images/vendor/intl-tel-input/build/flags.png');
});

Route::get('/[email protected]', function () {
return response()->file(__DIR__.'/../images/vendor/intl-tel-input/build/[email protected]');
});
// routes from the plugin code
Route::get('/phone-input-flags.png', function () {
return response()->file(__DIR__.'/../images/vendor/intl-tel-input/build/flags.png');
});

Route::get('/[email protected]', function () {
return response()->file(__DIR__.'/../images/vendor/intl-tel-input/build/[email protected]');
});
I have even manually added it to the vhost file
location = /phone-input-flags.png {
try_files $uri /index.php?$query_string;
}
location = /phone-input-flags.png {
try_files $uri /index.php?$query_string;
}
still, it is being considered as a static PNG file and the call is not going to Laravel route. On the other end livewire.js is working perfectly though. Could you please help with this if you have any ideas? thank you, πŸ™‚
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server