aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2020-10-01 08:49:49 -0400
committerGitHub <noreply@github.com>2020-10-01 20:49:49 +0800
commit156f54d6e2ec21b98ad070433fd94089ab3477c4 (patch)
tree9df483ccce64c69b856e3a42fc13b8c00293951c
parentc6da03365612c1f06505ad6aa43ce64336f7130d (diff)
downloadgitea-156f54d6e2ec21b98ad070433fd94089ab3477c4.tar.gz
gitea-156f54d6e2ec21b98ad070433fd94089ab3477c4.zip
allow U2F with default settings for gitea in subpath (#12990)
* allow U2F with default settings for gitea in subpath * use trim suffix Co-authored-by: zeripath <art27@cantab.net>
-rw-r--r--modules/setting/setting.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 867641e61b..cdbe07f911 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -933,7 +933,7 @@ func NewContext() {
newMarkup()
sec = Cfg.Section("U2F")
- U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").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, "/"))
UI.ReactionsMap = make(map[string]bool)