72028a7f3242d59c1264aa77a4a086cee1359f56
The previous attempt compared the Origin host against request.nextUrl.host, but behind the custom-server + reverse-proxy setup nextUrl.host does NOT resolve to the public host (mutations stayed 403 in prod). Accept the Origin/Referer host if it matches ANY of: the forwarded Host header (nginx sets `proxy_set_header Host $host` → crm.portnimara.com), APP_URL's host, or nextUrl.host. The Host header is the reliable source here. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Description
No description provided
Languages
TypeScript
98.7%
HTML
1%
CSS
0.1%
Shell
0.1%