expressjs / expressjs/cors

Configure Allowed Headers as Array of RegExp

Open
#299 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6.2k
Forks
512
PR merge metrics
No merged PRs in 30d

Description

I am working on rewriting a web application written in a different language/framework in Node, and I want to replicate the same CORS behavior we had before.

The old behavior was configured via an array of regex patterns, for example:
```
allowedHeaders = [
"^apollo-",
"^x-apollo-",
"^x-custom-app-header-",
"Accept",
"Content-Type",
...
]
```

Do we plan to support such a thing in this package? Or, if the maintainers are open to that, I can open a PR for this functionality.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.