Skip to content

Commit

Permalink
Fixed an issue where ExpressJS doesn't seem to set a default content-…
Browse files Browse the repository at this point in the history
…type
  • Loading branch information
LennardF1989 committed Nov 25, 2022
1 parent b92a793 commit e086f1c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,13 @@ const app = express()
app.use(loggingMiddleware)
app.use("/_wf", webFeaturesRouter)

// make sure all responses have a default content-type set
app.use(function (_req, res, next) {
res.contentType("text/plain")

next()
})

if (getFlag("loadoutSaving") === "PROFILES") {
app.use("/loadouts", loadoutRouter)
}
Expand Down

0 comments on commit e086f1c

Please sign in to comment.