Merge pull request #2 from Canecat/bugfix/oauth2RedirectUrl-param-added

Changed ReplaceAll to Replace
This commit is contained in:
Canecat 2019-11-27 17:38:41 +02:00 committed by GitHub
commit e8630c4f0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ func CustomWrapHandler(config *Config, h *webdav.Handler) gin.HandlerFunc {
specFileName = "doc.json"
}
specRegexStr := strings.ReplaceAll(specFileName, ".", "\\.")
specRegexStr := strings.Replace(specFileName, ".", "\\.", -1)
var rexp = regexp.MustCompile(`(.*)(index\.html|` + specRegexStr + `|favicon-16x16\.png|favicon-32x32\.png|/oauth2-redirect\.html|swagger-ui\.css|swagger-ui\.css\.map|swagger-ui\.js|swagger-ui\.js\.map|swagger-ui-bundle\.js|swagger-ui-bundle\.js\.map|swagger-ui-standalone-preset\.js|swagger-ui-standalone-preset\.js\.map)[\?|.]*`)
return func(c *gin.Context) {