File Uploading problem 401 Error.
[Everything works fine In local Environment]
Hello, I have this problem I'm using ngrok-free to host my app locally to test my app in online. Everything work's fine like loading image assets but when I try to Upload image using FileUpload it cause problem.
btw I didn't face this problem If I use normal upload Like using blade and controller. Here Is My setup that usually work with normal app.
File Upload
AppServiceProvider
Env

Solution:Jump to solution
I think
->trustProxies()
is the right way. I think you can add your ngrok IP to limit this, but I don't think there is a high risk when you keep your ngrok URL to yourself.3 Replies
Okey I found two solution
first one is using bootstrap\app.php
second one Is using AppServiceProvider
both of them fixed the problem but create security issue. Is there any other way that will help me with this kind of situation ?
Solution
I think
->trustProxies()
is the right way. I think you can add your ngrok IP to limit this, but I don't think there is a high risk when you keep your ngrok URL to yourself.Ohhh Okey Thanks Brother.