Skip to content

Commit

Permalink
customise cors policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Messer4 committed Jul 19, 2024
1 parent fba9146 commit e5d3bb3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,18 @@ import { z } from "zod";
var mime = require('mime-types')

const app = new OpenAPIHono();
app.use('/*', cors());

app.use(
'/*',
cors({
origin: '*',
allowHeaders: ['Content-Type', 'Accept-Encoding', 'Authorization'],
allowMethods: ['POST', 'GET', 'OPTIONS'],
exposeHeaders: [],
maxAge: 600,
credentials: true,
})
);

// <--Actions-->
app.route('/api/everstake/stake', everstake);
Expand Down

0 comments on commit e5d3bb3

Please sign in to comment.