mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-04 10:30:00 -06:00
Merge branch 'main' into feature/1.5.1
This commit is contained in:
@@ -23,7 +23,11 @@ export async function POST(request: Request): Promise<NextResponse> {
|
||||
responseInput.personId = null;
|
||||
}
|
||||
const agent = UAParser(request.headers.get("user-agent"));
|
||||
const country = headers().get("CF-IPCountry") || headers().get("X-Vercel-IP-Country") || undefined;
|
||||
const country =
|
||||
headers().get("CF-IPCountry") ||
|
||||
headers().get("X-Vercel-IP-Country") ||
|
||||
headers().get("CloudFront-Viewer-Country") ||
|
||||
undefined;
|
||||
const inputValidation = ZResponseLegacyInput.safeParse(responseInput);
|
||||
|
||||
if (!inputValidation.success) {
|
||||
|
||||
@@ -46,7 +46,11 @@ export async function POST(request: Request, context: Context): Promise<NextResp
|
||||
}
|
||||
|
||||
const agent = UAParser(request.headers.get("user-agent"));
|
||||
const country = headers().get("CF-IPCountry") || headers().get("X-Vercel-IP-Country") || undefined;
|
||||
const country =
|
||||
headers().get("CF-IPCountry") ||
|
||||
headers().get("X-Vercel-IP-Country") ||
|
||||
headers().get("CloudFront-Viewer-Country") ||
|
||||
undefined;
|
||||
const inputValidation = ZResponseInput.safeParse({ ...responseInput, environmentId });
|
||||
|
||||
if (!inputValidation.success) {
|
||||
|
||||
Reference in New Issue
Block a user