From c76d50092f65d2aacbf28958a1d587e48e4fb73a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Douglas=20Gad=C3=AAlha?= Date: Wed, 11 Dec 2019 14:33:10 -0300 Subject: [PATCH] Add Authorization to CORS Allowed Headers --- src/target/typescript_nodeserver.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/typescript_nodeserver.cr b/src/target/typescript_nodeserver.cr index 99bd909..f6aa92b 100644 --- a/src/target/typescript_nodeserver.cr +++ b/src/target/typescript_nodeserver.cr @@ -260,7 +260,7 @@ export function start(port: number = 8000) { res.setHeader("Access-Control-Allow-Origin", "*"); res.setHeader("Access-Control-Allow-Methods", "PUT, POST, GET, OPTIONS"); - res.setHeader("Access-Control-Allow-Headers", "Content-Type"); + res.setHeader("Access-Control-Allow-Headers", "Authorization, Content-Type"); res.setHeader("Access-Control-Max-Age", "86400"); res.setHeader("Content-Type", "application/json");