Articles in this section

WordPress website shows content incorrectly: all icons are shown as a square

Plesk for Linux kb: technical ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • WordPress website example.com or its Admin Dashboard shows content incorrectly - all icons are shown as a square:
    1.jpg

  • 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

  1. Go to Plesk > Domains > example.com > Apache & nginx Settings > Additional nginx directives

  2. Edit existing directive it should be like:

    CONFIG_TEXT: location ~ .(ttf|ttc|otf|eot|woff|woff2|font.css)$ {
    add_header Access-Control-Allow-Origin "*";
    }

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.