Open ichim-david opened 4 months ago
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.
res.locals.detectedHost
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