Update production deployment references

This commit is contained in:
2569718930@qq.com
2026-06-14 23:13:37 +08:00
parent e909f1f4c9
commit ef21a5808e
11 changed files with 22 additions and 26 deletions
+1 -4
View File
@@ -55,10 +55,7 @@ export async function POST(req: NextRequest) {
...(body ?? {}),
payload: {
...payload,
cf_country:
req.headers.get("cf-ipcountry") ||
req.headers.get("x-vercel-ip-country") ||
"",
cf_country: req.headers.get("cf-ipcountry") || "",
user_agent: req.headers.get("user-agent") || "",
referer_header: req.headers.get("referer") || "",
},
+1 -4
View File
@@ -165,10 +165,7 @@ async function trackAuthDiagnosticEvent(
response_mode: responseMode,
user_id: normalizedUserId || undefined,
email_domain: email?.includes("@") ? email.split("@").pop() : undefined,
cf_country:
req.headers.get("cf-ipcountry") ||
req.headers.get("x-vercel-ip-country") ||
"",
cf_country: req.headers.get("cf-ipcountry") || "",
user_agent: req.headers.get("user-agent") || "",
referer_header: req.headers.get("referer") || "",
captured_at: new Date().toISOString(),
@@ -41,7 +41,7 @@ async function findSupabaseUserIdByEmail(email: string) {
.replace(/\/$/, "");
const serviceRoleKey = String(process.env.SUPABASE_SERVICE_ROLE_KEY || "").trim();
if (!supabaseUrl || !serviceRoleKey) {
throw new Error("Supabase service role is not configured on Vercel");
throw new Error("Supabase service role is not configured on the server");
}
const profileRes = await fetch(
`${supabaseUrl}/rest/v1/profiles?select=id&email=eq.${encodeURIComponent(email)}&limit=1`,
+2 -2
View File
@@ -34,8 +34,8 @@ self.addEventListener("fetch", (event) => {
// Do not cache-first Next.js build chunks. A user can keep an old app shell
// open across deployments; if checkout UI is loaded later, stale/missing
// chunks surface as a generic page fault. Let the browser/Vercel handle
// immutable _next/static asset caching instead.
// chunks surface as a generic page fault. Let the browser handle immutable
// _next/static asset caching instead.
if (CACHEABLE_PUBLIC_ASSETS.includes(url.pathname)) {
event.respondWith(
caches.open(CACHE_NAME).then((cache) =>