mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 19:47:07 +09:00
Move middlewares to web/middleware (#14480)
Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
1 parent
0e0424c8ec
commit
5e20fd6dbf
26 files changed
+126
-126
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user