mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
feat(cors): add Access-Control-Allow-Credentials header for CORS support
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user