allowOrigin property
The allowed origins (Access-Control-Allow-Origin).
- Empty (the default): the request
Originis reflected, preserving the behavior of servers configured before this entry existed. - Not empty: an allowlist. The request
Originis reflected only when it matches an entry, otherwise noAccess-Control-Allow-Originis sent and the browser blocks the cross-origin read. An entry*allows any origin.
Note that reflecting any origin together with allowCredentials lets any
site perform credentialed calls to this API and read the responses: the
browser only rejects that pairing for a literal *. An allowlist here is
the fix.
Implementation
final List<String> allowOrigin;