Getting cors error on edit page
Hello everyone I hope you are all doing well.. I'm getting the CORS error on image upload at the edit page. can anyone assist me in this issue. I would really appreciate your assistance in this matter.
11 Replies
Your
APP_URL
doesn't match the domain you are using in the browserSolution
Which it says in that error message: Access
localhost:8000
from 127.0.0.1
okay I'll try this way and thanks for your assistance man 🙏🏽
@Dennis Koch hey man thank you it's working now
Hi, i know it’s been months after your problem has been solved, im getting the same errors, may i know how do you fix this?
What did you change in the .env file to match the domain and localhost url?
this
@Dennis Koch
im using the pretty url by laragon
.env
APP_URL=http://localhost
May i know what do i need to change?
Your browser URL is
murni-v3.test
so this must be your APP_URL
Thanks that works to get rid of CORS error, but now im wondering why did it does not found the image location
i know the reason why it does not found my image is because it trying to fetch wrong my currecnt URL+murni-v3.test/storage/complain/01J4Y7G6SQFH92CQVBZJ39Y2AH.jpg (image location)
it should have just fetch from murni-v3.test/storage/complain/01J4Y7G6SQFH92CQVBZJ39Y2AH.jpg right?
I don't know where that prefix comes from. Please open one thread per question and provide some code there
i've solved the issue by changing to
APP_URL=http://127.0.0.1:8000/
. Now it works even when im using pretty url
Sure, thanks a lot man