Skip to content

Commit e3328a4

Browse files
committed
[Encore] Deploying to a CDN subdirectory
1 parent 2c7042f commit e3328a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

frontend/encore/cdn.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ pages also use the CDN. Fortunately, the
3939
:ref:`entrypoints.json <encore-entrypointsjson-simple-description>` paths are updated
4040
to include the full URL to the CDN.
4141

42+
When deploying to a subdirectory of your CDN, you must add the path at the end of your URL -
43+
e.g. ``Encore.setPublicPath('https://my-cool-app.com.global.prod.fastly.net/awesome-website')``
44+
will generate assets URLs like ``https://my-cool-app.com.global.prod.fastly.net/awesome-website/dashboard.js``
45+
4246
If you are using ``Encore.enableIntegrityHashes()`` and your CDN and your domain
4347
are not the `same-origin`_, you may need to set the ``crossorigin`` option in
4448
your webpack_encore.yaml configuration to ``anonymous`` or ``use-credentials``

0 commit comments

Comments
 (0)