Coder Social home page Coder Social logo

CORS & CDN about wordpress-linux-appservice HOT 4 CLOSED

potrusil avatar potrusil commented on June 12, 2024
CORS & CDN

from wordpress-linux-appservice.

Comments (4)

rabollin avatar rabollin commented on June 12, 2024

@potrusil - Can you please raise a support ticket here: https://azure.microsoft.com/en-us/support/create-ticket to get needed assistance for you.

from wordpress-linux-appservice.

potrusil avatar potrusil commented on June 12, 2024

Hi @rabollin, I do not have a paid support plan to raise a ticket. However, here I wanted to point out that something is not working properly when following the steps described in Configuring Azure CDN with WordPress. When I was digging deeper I found out that the W3TC plugin creates an Nginx configuration which should fix the CORS issues:

# BEGIN W3TC CDN
location ~ \.(ttf|ttc|otf|eot|woff|woff2|font.css)$ {
    expires 31536000s;
    etag on;
    if_modified_since exact;
    add_header Pragma "public";
    add_header Cache-Control "public";
    add_header Referrer-Policy "no-referrer-when-downgrade";
    add_header Access-Control-Allow-Origin "*";
}
# END W3TC CDN

The problem is that this configuration is in /home/site/wwwroot/nginx.conf which is ignored by Nginx.

from wordpress-linux-appservice.

potrusil avatar potrusil commented on June 12, 2024

I was wrong. The configuration file /home/site/wwwroot/nginx.conf is in fact loaded by Nginx. And actually, when I tried to load the site today everything worked properly in all browsers. I have no idea what has changed. But I guess there is no need to update documentation.

from wordpress-linux-appservice.

JoshuaO avatar JoshuaO commented on June 12, 2024

I have the exact same issue. As shown below, the fonts of the theme is not loaded normally due to the CORS issue.

Access to font at 'https://xxxx-endpoint.azureedge.net/blobbuilttoworf7d6a133fb/wp-content/themes/prague/assets/fonts/fontawesome-webfont.woff2?v=4.7.0' from origin 'https://xxxx.azurewebsites.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

from wordpress-linux-appservice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.