Skip to content

Add support for configurable domain sub-paths - #74

Merged
brendan-kellam merged 5 commits into
mainfrom
bkellam/base_path
Nov 18, 2024
Merged

brendan-kellam merged 5 commits into
mainfrom
bkellam/base_path

Conversation

@brendan-kellam

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

Copy link
Copy Markdown
Contributor

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

deavmi commented Nov 18, 2024

Copy link
Copy Markdown

Going to give it a go now

@brendan-kellam
brendan-kellam merged commit 83270ff into main Nov 18, 2024
@brendan-kellam
brendan-kellam deleted the bkellam/base_path branch November 18, 2024 20:09
@duraki

duraki commented Jun 4, 2026 •

Copy link
Copy Markdown

We need this in new versions as well @brendan-kellam / @deavmi

@deavmi

deavmi commented Jun 4, 2026

Copy link
Copy Markdown

We need this in new versions as well @brendan-kellam / @deavmi

Yes

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

3 participants