Optional ReadonlyallowedAllowed request headers for the preflight Access-Control-Allow-Headers
response.
OMITTED (the default): an allowed origin's preflight ECHOES the request's
Access-Control-Request-Headers, and the response carries
Vary: Access-Control-Request-Headers.
The previous default was an empty list, which advertised no headers at
all while methods defaulted to every standard verb — so the preflight
offered POST/PUT/PATCH/DELETE and then refused content-type, the
one header a JSON body needs. Every browser blocked every JSON request.
Echoing does not widen the security boundary: the ORIGIN allowlist is what decides, and it is unchanged — a caller that reaches this branch has already been admitted, and the header it is asking for is one it is already sending. Configure a list to deny everything outside it.
Optional ReadonlycredentialsWhen true, emit Access-Control-Allow-Credentials: true.
Optional ReadonlyenabledEnable/disable CORS. Defaults to true when present.
Optional ReadonlyexposedExposed response headers for Access-Control-Expose-Headers.
Optional ReadonlymaxMax age (seconds) for preflight cache.
Optional ReadonlymethodsAllowed methods for preflight Allow-Methods header.
Optional ReadonlyoriginOrigin configuration:
true — reflect the request Origin headerfalse — deny all cross-originstring — single allowed originreadonly string[] — allowlist of originsCorsOriginMatcher — dynamic matcher
Default: empty allowlist (deny all cross-origin).
Options for CORS middleware.