expressjs / expressjs/cors

Reflection on Access-Control-Expose-Headers

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

Description

It would be nice to support reflection on `Access-Control-Expose-Headers` header. For example, following configuration allows access to any response header whose name starts with `X-Namespace-`.

```javascript
{
// ...
"exposedHeaders": /^X-Namespace-/i,
// ...
}
```

Supported types may include: boolean value, string, comma-separated string, RegExp., function predicate, and array of all of them, some of which are already supported in the case of `origin` or `allowedHeaders` option.

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.