mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-03 20:15:59 +01:00
Merge pull request #1712 from kounoike/pr-fix-1701
Allow anonymous access to github style git url redirect. fix #1701
This commit is contained in:
@@ -29,7 +29,7 @@ trait PreProcessControllerBase extends ControllerBase {
|
|||||||
*/
|
*/
|
||||||
get(!context.settings.allowAnonymousAccess, context.loginAccount.isEmpty) {
|
get(!context.settings.allowAnonymousAccess, context.loginAccount.isEmpty) {
|
||||||
if(!context.currentPath.startsWith("/assets") && !context.currentPath.startsWith("/signin") &&
|
if(!context.currentPath.startsWith("/assets") && !context.currentPath.startsWith("/signin") &&
|
||||||
!context.currentPath.startsWith("/register")) {
|
!context.currentPath.startsWith("/register") && !context.currentPath.endsWith("/info/refs")) {
|
||||||
Unauthorized()
|
Unauthorized()
|
||||||
} else {
|
} else {
|
||||||
pass()
|
pass()
|
||||||
|
|||||||
Reference in New Issue
Block a user