Skip to content
Snippets Groups Projects
Unverified Commit 8c6c93c7 authored by Nicolò Pretto's avatar Nicolò Pretto Committed by GitHub
Browse files

skip json() -> JSON.stringify and just forward the text (#49792)

parent a6a1e56a
No related branches found
No related tags found
No related merge requests found
...@@ -52,9 +52,10 @@ async function metabaseAuthHandler(req, res) { ...@@ -52,9 +52,10 @@ async function metabaseAuthHandler(req, res) {
try { try {
const response = await fetch(ssoUrl, { method: "GET" }); const response = await fetch(ssoUrl, { method: "GET" });
const token = await response.json(); const session = await response.text();
return res.status(200).json(token); console.log("Received session", session);
return res.status(200).set("Content-Type", "application/json").end(session);
} catch (error) { } catch (error) {
if (error instanceof Error) { if (error instanceof Error) {
res.status(401).json({ res.status(401).json({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment