fix cors
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Liam Chan 2023-04-12 01:58:09 +08:00
parent a4105eab0f
commit 90fb113248

View File

@ -46,7 +46,12 @@ http
statusCode = 404;
}
response.writeHead(statusCode, { "Content-Type": "application/json" });
response.writeHead(statusCode, {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "OPTIONS, POST, GET",
"Access-Control-Max-Age": 2592000, // 30 days
"Content-Type": "application/json",
});
response.end(JSON.stringify(responseBody));
})
.listen(8888);