Applicable to:
- Plesk for Linux
Symptoms
-
WordPress website example.com or its Admin Dashboard shows content incorrectly - all icons are shown as a square:
-
The following error can be found in Developer Tool of a Web Browser:
CONFIG_TEXT: Redirect has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://example.com' is therefore not allowed access.
-
There is the directive in Plesk > Domains > example.com > Apache & nginx Settings > Additional nginx directives:
CONFIG_TEXT: #location ~ .(ttf|ttc|otf|eot|woff|woff2|font.css)$ {
#add_header Access-Control-Allow-Origin "*";
#}Note: This directive can be completely absent.
Cause
Incorrect nginx directive.
Resolution
-
Go to Plesk > Domains > example.com > Apache & nginx Settings > Additional nginx directives
-
Edit existing directive it should be like:
CONFIG_TEXT: location ~ .(ttf|ttc|otf|eot|woff|woff2|font.css)$ {
add_header Access-Control-Allow-Origin "*";
}
Comments
0 comments
Please sign in to leave a comment.