Skip to content

Preserve browser vhost hostname when proxying to openHAB - #626

Merged
digitaldan merged 2 commits into
openhab:mainfrom
digitaldan:fix-browser-vhost-host-header
Aug 8, 2026
Merged

digitaldan merged 2 commits into
openhab:mainfrom
digitaldan:fix-browser-vhost-host-header

Conversation

@digitaldan

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Dan Cunningham <dan@digitaldan.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Preserves the browser-facing virtual host when proxying requests to openHAB.

Changes:

  • Sanitizes forwarded host headers and selects the browser proxy hostname.
  • Adds browser-vhost integration coverage.
  • Extends test configuration and web client host overrides.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/routes/index.ts Preserves the browser proxy host.
tests/integration/socket/vhost-proxy.test.ts Tests host forwarding and sanitization.
tests/integration/clients/web-client.ts Adds host override support.
docker/config.test.json Configures the browser proxy test host.
docker/config.ci.json Configures the browser proxy CI host.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +68 to +72
private applyHost<T extends supertest.Test>(req: T): T {
if (this.hostOverride) {
req.set('X-Forwarded-Host', this.hostOverride);
}
return req;
Signed-off-by: Dan Cunningham <dan@digitaldan.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@digitaldan
digitaldan merged commit 0822ef2 into openhab:main Aug 8, 2026
4 checks passed
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.

2 participants