Skip to content

Commit

Permalink
fix(runtime): fix runtime cors options (#1607)
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow authored Oct 25, 2023
1 parent d16bb36 commit 366a6a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion runtimes/nodejs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ DatabaseAgent.accessor.ready.then(() => {
DatabaseChangeStream.initialize()
})

app.use(cors())
app.use(cors({
origin: true,
methods: '*',
exposedHeaders: '*',
credentials: true,
}))

app.use(express.json({ limit: Config.REQUEST_LIMIT_SIZE }) as any)
app.use(
Expand Down
7 changes: 6 additions & 1 deletion runtimes/nodejs/src/storage-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ import cors from 'cors'

const app = express()

app.use(cors())
app.use(cors({
origin: true,
methods: '*',
exposedHeaders: '*',
credentials: true,
}))

const tryPath = (bucket: string, path: string) => {
const testPaths = path.endsWith('/')
Expand Down

0 comments on commit 366a6a4

Please sign in to comment.