Expose Content-Range, Accept-Ranges, Content-Length in CORS

This commit is contained in:
CallMeVerity
2026-06-03 04:24:09 +01:00
parent 1704b0b736
commit 17ea6ce7c4
+5 -1
View File
@@ -11,7 +11,11 @@ const PORT = parseInt(process.env.PORT || "3001");
const STATIC_DIR = process.env.STATIC_DIR || "./public"; const STATIC_DIR = process.env.STATIC_DIR || "./public";
const app = new Elysia() const app = new Elysia()
.use(cors()) .use(
cors({
exposeHeaders: ["Content-Range", "Accept-Ranges", "Content-Length"],
}),
)
.onError(({ error }) => { .onError(({ error }) => {
console.error("Unhandled error:", error); console.error("Unhandled error:", error);
return status(500, { error: "Internal server error" }); return status(500, { error: "Internal server error" });