Skip to content

Add support for configurable domain sub-paths #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 18, 2024

Conversation

brendan-kellam
Copy link
Contributor

@brendan-kellam brendan-kellam commented Nov 16, 2024

This PR adds the runtime environment variable DOMAIN_SUB_PATH that allows for configuration of what domain subpath Sourcebot will serve from. For example, if DOMAIN_SUB_PATH=/bot, the Sourcebot will serve from the endpoint http(s)://example.com/bot. This is useful for certain reverse proxy scenarios.

Under the hood, this is configuring the basePath parameter in the next.config.mjs. Unfortunately, basePath is not normally configurable at runtime, so I had to add more BAKED_ + find&replace trickery outlined in this blog.

Fixes #61

@brendan-kellam brendan-kellam changed the title Add support for configurable domain sub-path Add support for configurable domain sub-paths Nov 16, 2024
@deavmi
Copy link

deavmi commented Nov 18, 2024

Going to give it a go now

@brendan-kellam brendan-kellam merged commit 83270ff into main Nov 18, 2024
2 checks passed
@brendan-kellam brendan-kellam deleted the bkellam/base_path branch November 18, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reverse proxy support
2 participants