Fix sitemap
Most importantly, make it work globally.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ($included !== true) {
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
header('Location: /en/error/403');
|
||||
exit;
|
||||
function isHttps(): bool {
|
||||
// https://www.designcise.com/web/tutorial/how-to-check-for-https-request-in-php
|
||||
$isHttps = $_SERVER['HTTPS'] ?? $_SERVER['REQUEST_SCHEME'] ?? $_SERVER['HTTP_X_FORWARDED_PROTO'] ?? null;
|
||||
return $isHttps && (strcasecmp('on', $isHttps) === 0 || strcasecmp('https', $isHttps) === 0);
|
||||
}
|
||||
|
||||
function readPage(string $page): bool {
|
||||
|
||||
Reference in New Issue
Block a user