Skip to content

Commit

Permalink
fix(cors): add methods, allowed headers and origin
Browse files Browse the repository at this point in the history
  • Loading branch information
raghav-rama committed Nov 28, 2024
1 parent bada502 commit f4f083b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ import router from './routes/mintOptions.route.js';

const app = express();

app.use(cors());
app.use(
cors({
origin: '*',
methods: ['GET', 'POST'],
allowedHeaders: ['*'],
}),
);
app.use(express.json());

try {
Expand Down

0 comments on commit f4f083b

Please sign in to comment.