You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/guides/configuration/http_security_headers.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,12 +37,20 @@ Controls which origins are permitted to make cross-origin requests. Three modes
37
37
api_gateway.http.cors.allowed_origins = *
38
38
```
39
39
40
-
**Explicit allowlist** -- a comma-separated list of exact origins. Only requests whose `Origin` header matches one of these values will receive CORS headers. Requests from unlisted origins receive no `Access-Control-Allow-Origin` header at all, which causes the browser to block the response. When a match is found, `Access-Control-Allow-Credentials` is set to `true` and a `Vary: Origin` header is added:
40
+
**Explicit allowlist** -- a comma-separated list of origins. Only requests whose `Origin` header matches one of these values will receive CORS headers. Requests from unlisted origins receive no `Access-Control-Allow-Origin` header at all, which causes the browser to block the response. When a match is found, `Access-Control-Allow-Credentials` is set to `true` and a `Vary: Origin` header is added.
41
+
42
+
Entries can be exact origins or wildcard subdomain patterns using the `*.` prefix:
A wildcard pattern like `*.example.com` matches any subdomain (e.g. `https://app.example.com`, `https://staging.example.com`) but does **not** match the bare domain `https://example.com` itself. The exact requesting origin is always reflected back in the `Access-Control-Allow-Origin` header -- the `*.` is purely a server-side config convenience.
53
+
46
54
**Auto** -- derives the allowed origin from the incoming request's own scheme, host, and port (`Scheme://Host[:Port]`). This is effectively "same-origin only" and is useful when the frontend application is served from the same domain as the API. Default ports (80 for HTTP, 443 for HTTPS) are omitted:
0 commit comments