Skip to content

Commit 4a54d13

Browse files
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>
1 parent ec035dd commit 4a54d13

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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)