diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 45e55a2f9..42a01cc11 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -1032,8 +1032,8 @@ func NewContext() { newMarkup() sec = Cfg.Section("U2F") - U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").MustString(strings.TrimRight(AppURL, "/"))) - U2F.AppID = sec.Key("APP_ID").MustString(strings.TrimRight(AppURL, "/")) + U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").MustString(strings.TrimSuffix(AppURL, AppSubURL+"/"))) + U2F.AppID = sec.Key("APP_ID").MustString(strings.TrimSuffix(AppURL, "/")) zip.Verbose = false