Fixed incorrect URL generation in bootstrap API endpoint that server config files#599
Merged
Fixed incorrect URL generation in bootstrap API endpoint that server config files#599
Conversation
…defaulting to parsing the Request object's properties
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #599 +/- ##
==========================================
- Coverage 31.77% 31.72% -0.06%
==========================================
Files 90 90
Lines 10700 10703 +3
Branches 1422 1423 +1
==========================================
- Hits 3400 3395 -5
- Misses 7187 7196 +9
+ Partials 113 112 -1 🚀 New features to boost your workflow:
|
…ead; allows correct URL generation when server is behind NGINX server and accessed via Ingress or LoadBalancer, and when server is standalone
d-j-hatton
approved these changes
Jun 4, 2025
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.
The logic for constructing URL paths when accessing the server through an Ingress is currently faulty, leading to the creation of invalid URLs. This PR resolves this issue (as mentioned in Issue #597 ) by adding a function to construct the netloc properly by parsing the request headers before defaulting to parsing the Request object's properties. This allows for valid URLs to be generated for a range of server configurations:
Additionally, the URL generation logic in the HTML files we serve was optimised so that they work with the various server configurations listed above. Redundant HTML files have also been removed.
NOTE: This PR necesitates a change in the NGINX config so that the correct headers are forwarded to the backend.