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);
|
const allowedOrigin = getAllowedOrigin(request);
|
||||||
if (allowedOrigin) {
|
if (allowedOrigin) {
|
||||||
headers['Access-Control-Allow-Origin'] = allowedOrigin;
|
headers['Access-Control-Allow-Origin'] = allowedOrigin;
|
||||||
|
headers['Access-Control-Allow-Credentials'] = 'true';
|
||||||
headers['Vary'] = 'Origin';
|
headers['Vary'] = 'Origin';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -23,4 +23,4 @@ binding = "ATTACHMENTS_KV"
|
|||||||
|
|
||||||
[[migrations]]
|
[[migrations]]
|
||||||
tag = "v1-notifications-hub"
|
tag = "v1-notifications-hub"
|
||||||
new_sqlite_classes = ["NotificationsHub"]
|
new_sqlite_classes = [ "NotificationsHub" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user