Compare commits

...

1 Commits

Author SHA1 Message Date
422ab527f8 content-type??? 2021-12-01 22:10:47 +01:00
2 changed files with 3 additions and 0 deletions

View File

@ -90,6 +90,7 @@ export class AuthenticateController extends BaseController {
const resCheckTokenAuth = await openIDClient.checkTokenAuth(authTokenData.accessToken);
res.writeStatus("200");
this.addCorsHeaders(res);
res.writeHeader("Content-type", "application/json");
return res.end(JSON.stringify({ ...resCheckTokenAuth, ...resUserData, authToken: token }));
} catch (err) {
console.info("User was not connected", err);
@ -120,6 +121,7 @@ export class AuthenticateController extends BaseController {
res.writeStatus("200");
this.addCorsHeaders(res);
res.writeHeader("Content-type", "application/json");
return res.end(JSON.stringify({ ...data, authToken }));
} catch (e) {
console.error("openIDCallback => ERROR", e);

View File

@ -53,6 +53,7 @@ export class MapController extends BaseController {
const mapUrl = roomUrl.protocol + "//" + match[1];
res.writeStatus("200 OK");
res.writeHeader("Content-type", "application/json");
this.addCorsHeaders(res);
res.end(
JSON.stringify({