Skip to content

Commit

Permalink
feat: Updated the CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
dm94 committed Aug 14, 2024
1 parent d747acf commit 32de378
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stiletto-node-api",
"version": "3.0.1",
"version": "3.0.2",
"description": "API for [Stiletto Web](https://github.com/dm94/stiletto-web)",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ const server = fastify({
});

await server.register(cors, {
origin: '*',
methods: ['POST', 'GET', 'PUT', 'OPTIONS'],
allowedHeaders: ['Content-Type', 'Authorization'],
credentials: true,
origin: ["https://stiletto.deeme.dev", /\.deeme\.dev$/],
});

if (process.env.MYSQL_CONNECTION) {
Expand Down

0 comments on commit 32de378

Please sign in to comment.