Skip to content

Commit

Permalink
fix: allow CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitkolhe committed Oct 2, 2024
1 parent 57747e7 commit 902ad16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { OpenAPIHono } from '@hono/zod-openapi'
import { apiReference } from '@scalar/hono-api-reference'
import { cors } from 'hono/cors'
import { logger } from 'hono/logger'
import { prettyJSON } from 'hono/pretty-json'
import { Home } from './pages/home'
Expand Down Expand Up @@ -31,6 +32,7 @@ export class App {
private initializeGlobalMiddlewares() {
this.app.use(logger())
this.app.use(prettyJSON())
this.app.use(cors())
}

private initializeSwaggerUI() {
Expand Down

0 comments on commit 902ad16

Please sign in to comment.