Skip to content

Commit

Permalink
fix(apply): content-type for the whole res
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnl committed Apr 14, 2024
1 parent 51e1637 commit 20fa926
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import database from "../database/database.js"
const router = express.Router()

router.get("/authorized", async (req, res) => {
res.setHeader("Content-Type", "text/html")
try {
function answerToOpener(data) {
res.setHeader("Content-Type", "text/html")
res.end("<script>parent.opener.postMessage('" + JSON.stringify(data) + "', '" + process.env.COAL_APPLY_ORIGIN + "');window.close();</script>");
}
const code = req.query.code
Expand Down

0 comments on commit 20fa926

Please sign in to comment.