mirror of
https://github.com/thepeacockproject/Peacock
synced 2025-02-23 03:35:25 +01:00
Merge branch 'v5' of https://github.com/thepeacockproject/Peacock into v5
This commit is contained in:
commit
51303d2adb
@ -125,6 +125,20 @@ const app = express()
|
||||
app.use(loggingMiddleware)
|
||||
app.use("/_wf", webFeaturesRouter)
|
||||
|
||||
app.get("/", (req: Request, res) => {
|
||||
if (PEACOCK_DEV) {
|
||||
res.send("dev active, you need to access the UI from port 3000")
|
||||
} else {
|
||||
const data = readFileSync("webui/dist/index.html").toString()
|
||||
|
||||
res.contentType("text/html")
|
||||
res.send(data)
|
||||
}
|
||||
})
|
||||
|
||||
serveStatic.mime.define({ "application/javascript": ["js"] })
|
||||
app.use("/assets", serveStatic("webui/dist/assets"))
|
||||
|
||||
// make sure all responses have a default content-type set
|
||||
app.use(function (_req, res, next) {
|
||||
res.contentType("text/plain")
|
||||
@ -136,18 +150,6 @@ if (getFlag("loadoutSaving") === "PROFILES") {
|
||||
app.use("/loadouts", loadoutRouter)
|
||||
}
|
||||
|
||||
app.get("/", (req: Request, res) => {
|
||||
if (PEACOCK_DEV) {
|
||||
res.send("dev active, you need to access the UI from port 3000")
|
||||
} else {
|
||||
const data = readFileSync("webui/dist/index.html").toString()
|
||||
|
||||
res.send(data)
|
||||
}
|
||||
})
|
||||
|
||||
app.use("/assets", serveStatic("webui/dist/assets"))
|
||||
|
||||
app.get(
|
||||
"/config/:audience/:serverVersion(\\d+_\\d+_\\d+)",
|
||||
(req: RequestWithJwt<{ issuer: string }>, res) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user