Commit bcaaceb
authored
in_http: allow empty Origin header requests to pass CORS checks (#4866)
**Which issue(s) this PR fixes**:
**What this PR does / why we need it**:
Some requests, such as those made by apps, certain automated scripts, or
older browsers, may not include an Origin header. Previously, such
requests were blocked by the CORS check, even though they may not
necessarily be cross-origin.
For CORS, the server is responsible for reporting the allowed origins.
The web browser is responsible for enforcing that requests are only sent
from allowed domains. So this change updates the CORS handling logic to
allow requests with an empty Origin header to pass, ensuring
compatibility with legitimate non-browser clients while maintaining
security.
**Docs Changes**:
fluent/fluentd-docs-gitbook#574
**Release Note**:
The same as the title.
Signed-off-by: Richard Lee <14349+dlackty@users.noreply.github.com>1 parent 61d7a8e commit bcaaceb
2 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| 507 | + | |
507 | 508 | | |
508 | | - | |
| 509 | + | |
509 | 510 | | |
510 | 511 | | |
511 | 512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
943 | 963 | | |
944 | 964 | | |
945 | 965 | | |
| |||
0 commit comments