We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 890ae03 commit 10d20b5Copy full SHA for 10d20b5
1 file changed
include/prepend.inc
@@ -26,9 +26,12 @@ header("Permissions-Policy: interest-cohort=()");
26
}
27
28
$host = parse_url($_SERVER["HTTP_ORIGIN"]);
29
- if (!preg_match('/^(.+\.)?php\.net$/', $host["host"])) {
30
- if ($host["host"] != $_SERVER["SERVER_NAME"]) {
31
- exit(10);
+ if (!preg_match('/^(.+\.)?php\.net$/', $host["host"] ?? '')) {
+ if (($host["host"] ?? '') != $_SERVER["SERVER_NAME"]) {
+ // Unknown origin: just skip the CORS headers. Don't exit,
32
+ // or we send a blank 200 with no Cache-Control that the CDN
33
+ // happily caches as an empty homepage (see issue #1955).
34
+ return;
35
36
37
if (isset($host["port"])) {
0 commit comments