Skip to content

Commit 2994f7e

Browse files
authored
Merge pull request #5 from metabase/skip-json-manipulation
skip parsing and immediately re-serializing the session.
2 parents 5a9bab3 + a70d78a commit 2994f7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ app.get("/sso/metabase", async (req, res) => {
5050

5151
try {
5252
const response = await fetch(ssoUrl, { method: 'GET' })
53-
const token = await response.json()
53+
const session = await response.text()
5454

55-
console.log("Received token", token)
56-
return res.status(200).json(token)
55+
console.log("Received session", session)
56+
return res.status(200).set("Content-Type", "application/json").end(session)
5757
} catch (error) {
5858
if (error instanceof Error) {
5959
res.status(401).json({

0 commit comments

Comments
 (0)