Do not redirect git over http
It was probably a bug that these URLs were ever being redirected since
they're not part of the web UI.
Change-Id: Idc8efa9999111d96ef2951eecb0e0d2dbe141f91
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 39930cf..b4fd765 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectFilter.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/loginredirect/LoginRedirectFilter.java
@@ -16,10 +16,12 @@
import com.google.gerrit.extensions.registration.DynamicItem;
import com.google.gerrit.extensions.restapi.Url;
import com.google.gerrit.httpd.AllRequestFilter;
+import com.google.gerrit.httpd.GitOverHttpServlet;
import com.google.gerrit.httpd.WebSession;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import java.io.IOException;
+import java.util.regex.Pattern;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
@@ -51,6 +53,7 @@
|| path.equals("/ssh_info")
|| path.startsWith("/static/")
|| path.startsWith("/tools/hooks/")
+ || Pattern.compile(GitOverHttpServlet.URL_REGEX).matcher(path).matches()
|| sessionProvider.get().isSignedIn()) {
chain.doFilter(request, response);
} else {
diff --git a/src/main/resources/Documentation/about.md b/src/main/resources/Documentation/about.md
index f63cabe..9447377 100644
--- a/src/main/resources/Documentation/about.md
+++ b/src/main/resources/Documentation/about.md
@@ -1 +1 @@
-Redirect anonymous users to login form.
+Redirect anonymous web UI users to the login page.