Friday, November 17, 2017

How to avoid Access-Control-Allow-Origin error using htaccess

How to avoid Access-Control-Allow-Origin error using htaccess

Add the below code in you .htaccess file.

#avoid Access-Control-Allow-Origin error using htaccess
<IfModule mod_headers.c>
  <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
    Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
</IfModule>

No comments:

Post a Comment

Ionic framework Basics - 1

Ionic framework Basics - 1 1. Install Node.js check node js is installed Goto CMD   > type npm --> to check node js is inst...