diff --git a/docs/getting-started/configfile.md b/docs/getting-started/configfile.md index 7d5c948e0..c585a2920 100644 --- a/docs/getting-started/configfile.md +++ b/docs/getting-started/configfile.md @@ -38,3 +38,11 @@ ui: api_url: '/' # api url for ajax requests base_url: '' # the default deployment is in the root directory, you need to change this value when deploying in a subdirectory ``` + +:::tip + +Starting with the release that includes the frontend migration to Vite ([apache/answer#1567](https://github.com/apache/answer/pull/1567)), the frontend loads as ES modules instead of classic scripts. Same-origin deployments, where Answer serves its own static assets, need no changes. + +If your deployment serves static assets from a separate CDN origin, for example through the `cdn-aliyun` or `cdn-s3` plugin, the CDN must send an `Access-Control-Allow-Origin` header matching your site's origin (scheme, host, and port, for example `https://example.com`). A module script is always fetched in CORS mode, so without that header the browser refuses to run it and the page loads with no JavaScript, even though the request for the file itself succeeds. See the CDN plugin's README for a concrete CORS rule for that provider. + +::: diff --git a/docs/getting-started/upgrade.md b/docs/getting-started/upgrade.md index 44f3a42b1..e262c0029 100644 --- a/docs/getting-started/upgrade.md +++ b/docs/getting-started/upgrade.md @@ -57,3 +57,5 @@ If you are using a binary installation of answer, the upgrade steps are as follo When there are other unexpected cases such as upgrade exceptions, we provide a command to manually force the upgrade of Apache Answer. `answer upgrade -f v1.1.0` Executing this command will force upgrade from the specified version, even if your Apache Answer is already up to date. If you encounter an upgrade exception, you can try to execute this command or pull the latest docker image again and execute this command inside the container. ::: + +If you serve static assets from a separate CDN origin, ensure CORS is configured: see the [configuration file documentation](/docs/configfile) and the CDN plugin's README.