Sort allowed URLs alphabetically
Change-Id: I2bc88a3e5faaee02151663bfca95813ff7524656
diff --git a/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectFilter.java b/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectFilter.java
index 622ee48..87fb6c3 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectFilter.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectFilter.java
@@ -40,14 +40,14 @@
if (!httpReq.getContextPath().isEmpty()) {
path = path.substring(httpReq.getContextPath().length());
}
- if (path.equals("/login")
+ if (path.startsWith("/a/")
+ || path.startsWith("/Documentation/")
+ || path.equals("/favicon.ico")
+ || path.equals("/login")
|| path.startsWith("/login/")
|| path.equals("/oauth")
- || path.equals("/favicon.ico")
- || path.startsWith("/a/")
- || path.startsWith("/Documentation/")
- || path.startsWith("/static/")
|| path.equals("/ssh_info")
+ || path.startsWith("/static/")
|| path.startsWith("/tools/hooks/")
|| sessionProvider.get().isSignedIn()) {
chain.doFilter(request, response);