K
K
K1onny2017-12-28 11:19:44
CORS
K1onny, 2017-12-28 11:19:44

What does "Missing CORS header 'Access-Control-Allow-Origin'" mean?

Hello. In general, I am doing the standard replacement of Wordpress directory names so that it is not so clear that this is Wordpress.
I add to wp-config:
define('WP_CONTENT_FOLDERNAME', 'bitrix');
define('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME );
define('WP_CONTENT_URL', ' mysite.com '.WP_CONTENT_FOLDERNAME);
define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
define('WP_PLUGIN_URL', WP_CONTENT_URL.'/plugins');
Then I rename the directory from wp-content to bitrix
After that, the display of font-awesome icons disappears (and others too, plugin icons are not displayed in the admin panel). The whole structure is in order, except for the icons. I changed everything on another subdomain according to the same scheme, the icons did not disappear, the theme of the site is the same, the WP version is the same, the plugins are the same, I did everything according to the standard scheme.
It gives errors in the console:
Request from an external source is blocked: The policy of one source prohibits reading a remote resource at http://site/bitrix/plugins/js_composer/assets/lib/... (Reason: CORS header "Access-Control-Allow" is missing -Origin).
A request from an external source is blocked: The single origin policy prohibits reading a remote resource at http://website/bitrix/plugins/js_composer/assets/lib/...(Reason: missing CORS header "Access-Control-Allow-Origin").
Request from foreign origin blocked: The single origin policy prohibits reading a remote resource at http://site/bitrix/plugins/js_composer/assets/lib/... (Reason: CORS header "Access-Control-Allow-Origin" is missing).
I changed the paths, set font-awesome in functions.php, set it in the header, in css, all to no avail. Stupidly I remove the added lines with a change in directories and return the name wp-content to it - everything works.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2017-12-28
@HeadOnFire

I am doing the standard replacement of Wordpress directory names so that it is not so clear that this is Wordpress.

Stop doing bullshit. It's completely useless.
This is for cross-domain queries. Configured at the server level.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question