less restrictive cors
This commit is contained in:
1
Makefile
1
Makefile
@@ -4,6 +4,7 @@ build:
|
||||
pnpm install
|
||||
pnpm run -F client build
|
||||
pnpm run -F server dbdeploy
|
||||
pnpm run -F server dbtypes
|
||||
|
||||
start:
|
||||
PORT=$(PORT) pnpm start
|
||||
|
||||
@@ -6,12 +6,7 @@ import { staticPlugin } from "@elysiajs/static";
|
||||
const port = env.PORT || 5001;
|
||||
|
||||
const app = new Elysia()
|
||||
.use(
|
||||
cors({
|
||||
origin: "http://localhost:3000",
|
||||
credentials: true,
|
||||
})
|
||||
)
|
||||
.use(cors())
|
||||
.onRequest(({ request }) => {
|
||||
console.log(request.method, request.url);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user