Skip to content

Commit

Permalink
Fixup the merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Dlurak committed Jul 10, 2024
1 parent 9ee861d commit 7cf7fd4
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { cors } from "@elysiajs/cors";
import { swagger } from "@elysiajs/swagger";
import { DOCUMENTATION_OPTIONS } from "constants/documentation";
import { VERSION } from "constants/general";
Expand All @@ -20,13 +21,9 @@ import { edgedb } from "../dbschema/edgeql-js/imports";
export const client = edgedb.createClient();

const app = new Elysia()
.onBeforeHandle(({ set }) => {
set.headers["Access-Control-Allow-Credentials"] = "true";
set.headers["Access-Control-Allow-Headers"] = "*";
set.headers["Access-Control-Allow-Methods"] = "*";
set.headers["Access-Control-Allow-Origin"] = "*";
set.headers["Access-Control-Expose-Headers"] = "*";
set.headers["Access-Control-Exposed-Headers"] = "*";
.onAfterHandle(({ set }) => {
// biome-ignore lint: Delete is fine here
delete set.headers.Vary;
})
.use(swagger(DOCUMENTATION_OPTIONS))
.use(schoolRouter)
Expand All @@ -36,6 +33,7 @@ const app = new Elysia()
.use(calendarRouter)
.use(tagRouter)
.use(noteRouter)
.use(cors())
.get(
"/",
() => ({
Expand Down

0 comments on commit 7cf7fd4

Please sign in to comment.