mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 21:00:41 +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';
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -23,4 +23,4 @@ binding = "ATTACHMENTS_KV"
|
||||
|
||||
[[migrations]]
|
||||
tag = "v1-notifications-hub"
|
||||
new_sqlite_classes = ["NotificationsHub"]
|
||||
new_sqlite_classes = [ "NotificationsHub" ]
|
||||
|
||||
Reference in New Issue
Block a user