Comparing version
10
auth.js
@@ -68,2 +68,12 @@ import { custom, generators, Issuer } from 'openid-client'; | ||
} | ||
// process the CORS preflight OPTIONS request | ||
if (request.method === 'OPTIONS') { | ||
response.writeHead(200, { | ||
'Access-Control-Allow-Origin': '*', | ||
'Access-Control-Allow-Methods': 'GET, POST', | ||
'Access-Control-Allow-Headers': 'Content-Type', | ||
}); | ||
response.end(); | ||
return; | ||
} | ||
log.debug(`Callback received: ${request.url}`); | ||
@@ -70,0 +80,0 @@ const params = neonOAuthClient.callbackParams(request); |
@@ -8,3 +8,3 @@ { | ||
"type": "module", | ||
"version": "1.27.5", | ||
"version": "1.27.6", | ||
"description": "CLI tool for NeonDB Cloud management", | ||
@@ -11,0 +11,0 @@ "main": "index.js", |
134896
0.32%3448
0.29%