1
0
Fork 0
forked from forgejo/forgejo

Move middlewares to web/middleware (#14480)

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Lunny Xiao 2021-01-30 16:55:53 +08:00 committed by GitHub
parent 0e0424c8ec
commit 5e20fd6dbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 126 additions and 126 deletions

View file

@ -12,8 +12,8 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/middlewares"
"code.gitea.io/gitea/modules/timeutil"
"code.gitea.io/gitea/modules/web/middleware"
)
// Ensure the struct implements the interface.
@ -122,7 +122,7 @@ func (o *OAuth2) VerifyAuthData(req *http.Request, w http.ResponseWriter, store
return nil
}
if middlewares.IsInternalPath(req) || !middlewares.IsAPIPath(req) && !isAttachmentDownload(req) {
if middleware.IsInternalPath(req) || !middleware.IsAPIPath(req) && !isAttachmentDownload(req) {
return nil
}