Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource

If you have following error

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at

Then you need to add some lines to your .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

Header add Access-Control-Allow-Origin „*“
Header add Access-Control-Allow-Headers „origin, x-requested-with, content-type“
Header add Access-Control-Allow-Methods „PUT, GET, POST, DELETE, OPTIONS“

RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

С етикет: , , , ,
Публикувано в Joomla, linux, wordpress

Вашият коментар

Вашият имейл адрес няма да бъде публикуван.

*