Skip to content

Commit

Permalink
Merge pull request #11 from viv3kk/master
Browse files Browse the repository at this point in the history
Handle CORS issue for chrome
  • Loading branch information
muratcorlu authored Dec 19, 2022
2 parents 39c667c + 157bdd8 commit c896cf9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ if (program.verbose) {
});
}

app.use(cors());
var corsOptions = {
origin: true,
credentials: true,
methods: "GET,HEAD,PUT,PATCH,POST,DELETE",
preflightContinue: false,
optionsSuccessStatus: 204
};

app.use(cors(corsOptions));

for (var path in config.map) {
(function (basePath) {
Expand Down

0 comments on commit c896cf9

Please sign in to comment.