Skip to content

Commit

Permalink
Update lib/utils/domain-config.ts
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
mikepsinn and coderabbitai[bot] authored Nov 20, 2024
1 parent 5455198 commit 9406d19
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/utils/domain-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ export function getDomainConfig(hostname?: string | null): DomainConfigType {
try {
const headersList = headers()
hostname = headersList.get('host')
if (!hostname) {
console.warn('No host header found, falling back to default domain');
}
} catch (e) {
// Fallback to default if headers() fails
console.error('Failed to access headers:', e);
return domainConfigs["wishonia.love"]
}
}
Expand Down

0 comments on commit 9406d19

Please sign in to comment.