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 f0c57a7f9c
commit cb137fe0c7
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';
}