fix lambda CORS

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov
2021-08-08 17:10:36 +02:00
parent ce348f1a92
commit 67940e0d35
4 changed files with 12 additions and 7 deletions
+5 -5
View File
@@ -106,11 +106,11 @@ const api = new awsx.apigateway.API("login", {
const result = handle(body, serverEndpoint.get())
return {
statusCode: result.statusCode,
// headers: {
// "Access-Control-Allow-Headers" : "Content-Type",
// "Access-Control-Allow-Origin": "*",
// "Access-Control-Allow-Methods": "GET,HEAD,POST"
// },
headers: {
"Access-Control-Allow-Headers" : "Content-Type",
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "OPTIONS,POST"
},
body: result.body
}
},