vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 8ff50481e58256f274ef364f9ea29759752df4b5
parent be4e6c6f0ce6692c29d3dc3721d9a64b64c647f8
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Fri, 13 Jul 2018 00:33:28 +0200

Use X-Forwarded-Host if available

Diffstat:
Msrc/auth.rs | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/auth.rs b/src/auth.rs @@ -128,7 +128,9 @@ impl<'a, 'r> FromRequest<'a, 'r> for Headers { "http" }; - let host = if let Some(host) = headers.get_one("Host") { + let host = if let Some(host) = headers.get_one("X-Forwarded-Host") { + host + } else if let Some(host) = headers.get_one("Host") { host } else { ""