Skip to content

Commit 048a701

Browse files
fix(web): Set metadataBase to fix og:image URL behind reverse proxy (#908)
* fix(web): Set metadataBase to fix og:image URL behind reverse proxy Without metadataBase, Next.js falls back to the raw HTTP request host (localhost:8080) when constructing the absolute og:image URL from opengraph-image.tsx. Setting metadataBase to AUTH_URL ensures the public-facing URL is used instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: Update CHANGELOG for #908 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ec035dd commit 048a701

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
- Fixed `og:image` URL resolving to `localhost` instead of the public domain when the app is deployed behind a reverse proxy. [#908](https://github.com/sourcebot-dev/sourcebot/pull/908)
12+
1013
## [4.11.3] - 2026-02-19
1114

1215
### Fixed

packages/web/src/app/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { PlanProvider } from "@/features/entitlements/planProvider";
1111
import { getEntitlements } from "@sourcebot/shared";
1212

1313
export const metadata: Metadata = {
14+
metadataBase: new URL(env.AUTH_URL),
1415
// Using the title.template will allow child pages to set the title
1516
// while keeping a consistent suffix.
1617
title: {

0 commit comments

Comments
 (0)