feat: support configuring the base path#2603
Open
rgelinas-polygon wants to merge 1 commit intosafe-global:mainfrom
Open
feat: support configuring the base path#2603rgelinas-polygon wants to merge 1 commit intosafe-global:mainfrom
rgelinas-polygon wants to merge 1 commit intosafe-global:mainfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Member
|
@rgelinas-polygon could you try configuring the prefix midleware header from your proxy? |
cryptobuks
pushed a commit
to groundbasesoft/cla-signatures
that referenced
this pull request
Oct 14, 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.
Make sure these boxes are checked! 📦✅
./run_tests.shpre-commit run -asetup_service.py, provide a link to yoursafe-deployments PR and check network name
exists in safe-eth-py
What was wrong? 👾
We are looking to proxy many transaction services behind a single domain - because there are redirects (swagger functionality, Django appending slashes and redirecting by default, etc.), we need to change the base path of the app. We experimented with the
FORCE_SCRIPT_NAMEoption added in #400, but it did not solve the problem for us. Changing the script name adjusted the base domain rather than solely the base path Django expects to use.How was it fixed? 🎯
I simply added a new environment variable called
DJANGO_BASE_PATHthat fills out theBASE_PATHsetting, and ensured that all URLs were prefixed by the base path. By default the base path is empty, and nothing changes.