Answer the question
In order to leave comments, you need to log in
How to enable CORS for subdomains in laravel?
From my.domain.loc I send a request to domain.loc and get an error Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at ... . I found the /config/cors.php file:
How to set it up only for subdomains (possibly for some other domains) is not clear to me, I did not find anything on this file in the dock.
Answer the question
In order to leave comments, you need to log in
This file essentially repeats the issuance of cors headers , to allow only subdomains, you need to list allowed origins in allowed origins or regexps in allowed origins patterns, which will be used to check the permission of a cross-domain call
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question