summary refs log tree commit diff
path: root/src/api/Server.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2024-08-22 09:53:34 +1000
committerGitHub <noreply@github.com>2024-08-22 09:53:34 +1000
commitad2dda63c9969f18caa4cf78ce45ebf3fd5dc28c (patch)
tree4e01535ebb34c7c215293953ac58407e84332dae /src/api/Server.ts
parentre-add CDN TODO comment (diff)
parentMerge pull request #1193 from DEVTomatoCake/fix/forgot-password-security (diff)
downloadserver-ts-ad2dda63c9969f18caa4cf78ce45ebf3fd5dc28c.tar.xz
Merge branch 'master' into fix/widget.json-channel-ordering-deleted-channels
Diffstat (limited to 'src/api/Server.ts')
-rw-r--r--src/api/Server.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/Server.ts b/src/api/Server.ts

index 40d2b6dcb..bea75d7e2 100644 --- a/src/api/Server.ts +++ b/src/api/Server.ts
@@ -34,7 +34,7 @@ import "missing-native-js-functions"; import morgan from "morgan"; import path from "path"; import { red } from "picocolors"; -import { Authentication, CORS } from "./middlewares/"; +import { Authentication, CORS, ImageProxy } from "./middlewares/"; import { BodyParser } from "./middlewares/BodyParser"; import { ErrorHandler } from "./middlewares/ErrorHandler"; import { initRateLimits } from "./middlewares/RateLimit"; @@ -137,6 +137,8 @@ export class SpacebarServer extends Server { app.use("/api/v9", api); app.use("/api", api); // allow unversioned requests + app.use("/imageproxy/:hash/:size/:url", ImageProxy); + app.get("/", (req, res) => res.sendFile(path.join(PUBLIC_ASSETS_FOLDER, "index.html")), );