mirror of
https://github.com/go-gitea/gitea
synced 2025-11-05 13:58:12 +00:00
Backport #34024 since there are too many AI crawlers. The new code is covered by tests and it does nothing if users don't set it.
This commit is contained in:
@@ -74,7 +74,7 @@ func testGitSmartHTTP(t *testing.T, u *url.URL) {
|
||||
}
|
||||
|
||||
func testRenamedRepoRedirect(t *testing.T) {
|
||||
defer test.MockVariableValue(&setting.Service.RequireSignInView, true)()
|
||||
defer test.MockVariableValue(&setting.Service.RequireSignInViewStrict, true)()
|
||||
|
||||
// git client requires to get a 301 redirect response before 401 unauthorized response
|
||||
req := NewRequest(t, "GET", "/user2/oldrepo1/info/refs")
|
||||
|
||||
Reference in New Issue
Block a user