Answer the question
In order to leave comments, you need to log in
How to enable CORS on cross-domain $.get request to public storage?
Hey!
The situation is such that the frontend part of the site is on one computer of the local network, and the backend is on the other. I managed to set up CORS for requests specified in Laravel routes, but when I try to make a get request for a file from storage on another computer, it gives an error:
XMLHttpRequest cannot load 192.168.1.37:8000/storage/icons/rain.svg . No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ' 127.0.0.1:8887 ' is therefore not allowed access.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question