Also purge cgit urls, in addition to existing gitweb ones
authorMagnus Hagander <magnus@hagander.net>
Mon, 4 Jan 2021 12:57:40 +0000 (13:57 +0100)
committerMagnus Hagander <magnus@hagander.net>
Mon, 4 Jan 2021 12:59:12 +0000 (13:59 +0100)
triggers.py

index c875322c04f4b14e3e05d4321b7d6ed740ff1779..557f5f3654771c0565195737198a5f57c88ade12 100644 (file)
@@ -26,12 +26,14 @@ class varnishpurger(object):
 
     def pushtrigger(self, reponame, username):
         # Make a callback to a local varnish server to purge a repository
-        # from it. Assumes gitweb style URLs.
+        # from it, both gitweb and cgit.
         # Also, purge the actual http serving git repo itself.
         for u in [
                 r'^/gitweb/?$',
                 r'^/gitweb/\?p=%s.git' % reponame,
                 r'^/git/%s' % reponame,
+                r'^/cgit/?$',
+                r'^/cgit/%s' % reponame,
         ]:
             if not self._internal_purge(u):
                 print("Varnish purge failed, website may become slightly out of date")