diff --git a/data/web/inc/prerequisites.inc.php b/data/web/inc/prerequisites.inc.php index b5f150fc..5a6ed18c 100644 --- a/data/web/inc/prerequisites.inc.php +++ b/data/web/inc/prerequisites.inc.php @@ -26,7 +26,7 @@ require_once 'inc/lib/Yubico.php'; // U2F API require_once 'inc/lib/U2F.php'; -$u2f = new u2flib_server\U2F('https://' . $_SERVER['HTTP_HOST']); +$u2f = new u2flib_server\U2F('https://' . $_SERVER['SERVER_NAME']); // PDO $dsn = "$database_type:host=$database_host;dbname=$database_name"; diff --git a/data/web/u2f_api.php b/data/web/u2f_api.php index cd3a4ab6..ddeb1ece 100644 --- a/data/web/u2f_api.php +++ b/data/web/u2f_api.php @@ -3,7 +3,7 @@ require_once('inc/prerequisites.inc.php'); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ); -$u2f = new u2flib_server\U2F('https://' . $_SERVER['HTTP_HOST']); +$u2f = new u2flib_server\U2F('https://' . $_SERVER['SERVER_NAME']); function getRegs($username) { global $pdo; diff --git a/docs/first_steps.md b/docs/first_steps.md index 91cfb581..2202794c 100644 --- a/docs/first_steps.md +++ b/docs/first_steps.md @@ -126,7 +126,6 @@ server { location / { proxy_pass http://127.0.0.1:8080/; proxy_redirect http://127.0.0.1:8080/ $scheme://$host:$server_port/; - proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;