Skip to content

Commit 902ad16

Browse files
committed
fix: allow CORS
1 parent 57747e7 commit 902ad16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/app.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { OpenAPIHono } from '@hono/zod-openapi'
22
import { apiReference } from '@scalar/hono-api-reference'
3+
import { cors } from 'hono/cors'
34
import { logger } from 'hono/logger'
45
import { prettyJSON } from 'hono/pretty-json'
56
import { Home } from './pages/home'
@@ -31,6 +32,7 @@ export class App {
3132
private initializeGlobalMiddlewares() {
3233
this.app.use(logger())
3334
this.app.use(prettyJSON())
35+
this.app.use(cors())
3436
}
3537

3638
private initializeSwaggerUI() {

0 commit comments

Comments
 (0)