April 26, 2019
Cross-origin resource sharing (CORS)

Using Cross-origin resource sharing (CORS) you can limit resources like JavaScript, font, etc. It works as a security system, on a web page to be requested from a 3rd party domain outside the domain from which these resources delivered. Continuing CORS from the web server helps in maintaining highest control on who can access website resources.
Add the following code in your .htaccess file to execute the Cross-origin resource sharing (CORS).
Want to know more about .htaccess click here.
1 2 3 4 5 |
<IfModule mod_headers.c > Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Methods "GET,PUT,POST,DELETE" Header set Access-Control-Allow-Headers "Content-Type, Authorization" </IfModule> |
CORSCross-origin resource sharingserverserver response
Mraj
Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts. If you have any questions let me drop an email with the article name to the following email id: [email protected]