volto icon indicating copy to clipboard operation
volto copied to clipboard

RAZZLE_PUBLIC_URL is overridden by server.jsx code

Open ichim-david opened this issue 1 year ago • 1 comments

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

  1. 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

  2. use only config.settings.publicURL here https://github.com/plone/volto/blob/main/packages/volto/src/server.jsx#L293

ichim-david avatar Jun 22 '24 10:06 ichim-david

@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.

davisagli avatar Jun 26 '24 01:06 davisagli

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. 🧹

github-actions[bot] avatar Mar 27 '25 00:03 github-actions[bot]