Skip to content

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