diff --git a/frontend/encore/cdn.rst b/frontend/encore/cdn.rst index a7a2884c13a..17df7ffce21 100644 --- a/frontend/encore/cdn.rst +++ b/frontend/encore/cdn.rst @@ -39,6 +39,10 @@ pages also use the CDN. Fortunately, the :ref:`entrypoints.json ` paths are updated to include the full URL to the CDN. +When deploying to a subdirectory of your CDN, you must add the path at the end of your URL - +e.g. ``Encore.setPublicPath('https://my-cool-app.com.global.prod.fastly.net/awesome-website')`` +will generate assets URLs like ``https://my-cool-app.com.global.prod.fastly.net/awesome-website/dashboard.js`` + If you are using ``Encore.enableIntegrityHashes()`` and your CDN and your domain are not the `same-origin`_, you may need to set the ``crossorigin`` option in your webpack_encore.yaml configuration to ``anonymous`` or ``use-credentials``