Pass UI_URL to the frontend as DSPACE_UI_BASEURL - #1491
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to forward the public UI URL (UI_URL) into the dspace-angular container so Angular SSR can use the correct ui.baseUrl (and avoid Host mismatches that trigger SSR rejection / CSR fallback).
Changes:
- Adds
DSPACE_UI_BASEURLto thedspace-angularservice environment indocker/docker-compose.yml(derived fromUI_URLwith a default fallback).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the fix from dataquest-dev/devops#62 to the
customer/TULdocker-compose.What
Adds
DSPACE_UI_BASEURL: ${UI_URL:-http://127.0.0.1:4000}to thedspace-angularservice environment, so the public UI URL is forwarded into the frontend container.Why
The frontend never received
UI_URL, soui.baseUrlkept the built-in defaulthttp://localhost:4000, while the backend already gets the correct value viadspace.ui.url. On DSpace 9.x,server.tsbuilds Angular's SSR host allowlist fromui.baseUrl; a request with any otherHostis rejected, DSpace falls back to client-side rendering and answers 200 for every route — including routes that do not exist.See dataquest-dev/devops#62 for full context and verification.