RAZZLE_PUBLIC_URL is overridden by server.jsx code
Describe the bug Volto should use the razzle env for setting publicURL
To Reproduce Steps to reproduce the behavior: Start Volto with: RAZZLE_PUBLIC_URL=http://backend:8080/SITE pnpm start inspect within the browser devtools: window.env.publicURL locally you will see it being http://localhost:3000 instead of http://backend:8080/SITE
Expected behavior
-
Remove https://github.com/plone/volto/blob/main/packages/volto/src/server.jsx#L162 Since we define config.settings.publicURL https://github.com/plone/volto/blob/main/packages/volto/src/config/index.js#L57
-
use only config.settings.publicURL here https://github.com/plone/volto/blob/main/packages/volto/src/server.jsx#L293
@ichim-david It makes sense to me that RAZZLE_PUBLIC_URL should take precedence if it was set. But let's not remove using res.locals.detectedHost -- that's important if RAZZLE_PUBLIC_URL was not set.
Hi There! 👋
We haven't seen any activity on this issue in a while :sleeping:, and we want to make sure that it's still relevant.
If updating to the latest version of Volto doesn't help, please let us know by:
- adding a comment about what needs to be done next 💬
- updating its status and other labels 🏷️
Otherwise close this issue. 🧹