feat(cors): add Access-Control-Allow-Credentials header for CORS support

This commit is contained in:
shuaiplus committed 2026-03-09 00:52:24 +08:00
1 parent 899f1004a3
commit 1285f6296e
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -54,6 +54,7 @@ function buildCorsHeaders(request: Request): Record<string, string> {
const allowedOrigin = getAllowedOrigin(request);
if (allowedOrigin) {
headers['Access-Control-Allow-Origin'] = allowedOrigin;
headers['Access-Control-Allow-Credentials'] = 'true';
headers['Vary'] = 'Origin';
}