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 b03698fadbbdefdccf63b8ea71eadf7dc19e7da8
parent 4eee6e7aee0ce4fce8eaebc877999cde6670ddc7
Author: Daniel GarcĂ­a <dani-garcia@users.noreply.github.com>
Date:   Sun, 31 May 2020 00:22:46 +0200

Merge pull request #1010 from jjlin/admin-url

Avoid double-slashes in the admin URL
Diffstat:
Msrc/api/admin.rs | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/api/admin.rs b/src/api/admin.rs @@ -63,7 +63,9 @@ fn admin_path() -> String { /// Used for `Location` response headers, which must specify an absolute URI /// (see https://tools.ietf.org/html/rfc2616#section-14.30). fn admin_url() -> String { - format!("{}{}", CONFIG.domain(), ADMIN_PATH) + // Don't use CONFIG.domain() directly, since the user may want to keep a + // trailing slash there, particularly when running under a subpath. + format!("{}{}{}", CONFIG.domain_origin(), CONFIG.domain_path(), ADMIN_PATH) } #[get("/", rank = 2)]