V
V
Vladimir2017-04-14 10:29:16
MODX
Vladimir, 2017-04-14 10:29:16

How to solve the problem of passing headers?

Hello. Such a mistake.
XMLHttpRequest cannot load http://site.newserver.ru/ajax.json(this is a copy of the main domain) Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin ' xn----7sbbag3bufvkjkjkl.xn--p1ai ' is therefore not allowed access.
Esteemed, it is written add header header
<?php header("Access-Control-Allow-Origin: *");?>
Added to the beginning of the file
Didn't work. Maybe it's in Cyrillic?
Maybe someone did? Faced? Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question