file upload 401 unauthorized
Laravel 11.9, PHP 8.3, and Livewire 3.5,
I'm experiencing difficulties with file upload. Every time I try to upload a file, whether it's an image or a video, I encounter a "401 Unauthorized" error, which only appears in the production environment.
I've attempted multiple solutions from Google, but sadly, none have been effective, including some changes to Nginx configurations and other adjustments.
forceScheme https not working
nginx config also not working
Trusted proxies
I've already tried all the fixes from here:
https://github.com/filamentphp/filament/discussions/9243
https://github.com/livewire/livewire/discussions/3084
this is so frustrating :/
but it works on my machine
I'm experiencing difficulties with file upload. Every time I try to upload a file, whether it's an image or a video, I encounter a "401 Unauthorized" error, which only appears in the production environment.
I've attempted multiple solutions from Google, but sadly, none have been effective, including some changes to Nginx configurations and other adjustments.
I've already tried all the fixes from here:
https://github.com/filamentphp/filament/discussions/9243
https://github.com/livewire/livewire/discussions/3084
this is so frustrating :/
but it works on my machine
Solution
Ok, also try added before the location .php etc
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}