CORS stands for cross-origin request in which we request for the particular resources like images or fonts from outside of the website. You can manage your website resources like images, fonts etc by using CORS.
CORS on Linux server
You can use below code to enable cross-domain scripting (CORS) on limux server. You have to add this code in your .htaccess file.
CORS on Windows server
On windows server you have to add below code in your web.config file to enable CORS on server.
CORS on Linux server
You can use below code to enable cross-domain scripting (CORS) on limux server. You have to add this code in your .htaccess file.
Code:
<ifModule mod_headers.c>
Header set Access-Control-Allow-Origin: *
</ifModule>
On windows server you have to add below code in your web.config file to enable CORS on server.
Code:
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>