Expose Content-Range, Accept-Ranges, Content-Length in CORS
This commit is contained in:
@@ -11,7 +11,11 @@ const PORT = parseInt(process.env.PORT || "3001");
|
||||
const STATIC_DIR = process.env.STATIC_DIR || "./public";
|
||||
|
||||
const app = new Elysia()
|
||||
.use(cors())
|
||||
.use(
|
||||
cors({
|
||||
exposeHeaders: ["Content-Range", "Accept-Ranges", "Content-Length"],
|
||||
}),
|
||||
)
|
||||
.onError(({ error }) => {
|
||||
console.error("Unhandled error:", error);
|
||||
return status(500, { error: "Internal server error" });
|
||||
|
||||
Reference in New Issue
Block a user