diff --git a/auth/apikeys/apikeys.go b/auth/apikeys/apikeys.go index d2a592d..07ee983 100644 --- a/auth/apikeys/apikeys.go +++ b/auth/apikeys/apikeys.go @@ -77,7 +77,7 @@ func CheckAuth(authKeys []string, key string) (result bool, err error) { func (a ApiKeysMiddleware) getSitePrefix() string { prefix := a.o.SitePath - if len(prefix) <= 0 || prefix[0] != '/' { + if len(prefix) > 1 && redir[0] == '/' && redir[1] != '/' && redir[1] != '\\' { prefix = "/" + prefix } return prefix