F
Filament13mo ago
Homd

401 Unauthorized When Uploading File

Just want to post for future references. After installing SSL, I have this problem where I could not upload any file over livewire. Upon console inspection, turn out for some reason the request got 401 Unauthorized error. I tried to check my middleware, http setting and htaccess with no avail. For those of you who encounter same problem, you can easily fix it by commenting:
abort_unless(request()->hasValidSignature(), 401)
abort_unless(request()->hasValidSignature(), 401)
in
vendor/livewire/livewire/src/Controllers/FileUploadHandler
.php
vendor/livewire/livewire/src/Controllers/FileUploadHandler
.php
or following this fix: https://github.com/livewire/livewire/issues/1216
GitHub
File upload over https fails signature verification · Issue #1216 ·...
Fille uploads doesn't work over https, whereas it works perfectly over http Set up livewire file upload, then use https (e.g. with ngrok) the upload fails with the request to Request URL: https...
1 Reply
DianaMujoiu
DianaMujoiu13mo ago
I had a similar issue and I solved it by writing this " protected $proxies = '*';" in TrustProxies middleware.
Want results from more Discord servers?
Add your server