Skip to content

Commit a2da666

Browse files
Potential fix for code scanning alert no. 18: Server-side request forgery
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 4c6f319 commit a2da666

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

app/api/admin/integrations/test/route.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ function getSafeKenerOrigin(baseUrl?: string): string | null {
5656
if (parsed.username || parsed.password) return null
5757
if (isPrivateOrLocalHost(parsed.hostname)) return null
5858

59+
const allowedOrigins = new Set(['https://emberlystat.us'])
60+
if (!allowedOrigins.has(parsed.origin)) return null
61+
5962
return parsed.origin
6063
}
6164

0 commit comments

Comments
 (0)