]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
(no bug) add a doc comment explaining the REWRITE_ stuff (#98)
authorDylan Hardison <dylan@hardison.net>
Fri, 22 Mar 2024 02:13:32 +0000 (19:13 -0700)
committerGitHub <noreply@github.com>
Fri, 22 Mar 2024 02:13:32 +0000 (22:13 -0400)
extensions/BMO/Extension.pm

index 7350fbd7978a91708206214a10703b9fa11a7acf..ff587d47856b27c35e22fb74d1ae796ca6953025 100644 (file)
@@ -2799,6 +2799,17 @@ sub app_startup {
     }
   );
 
+  # In previous versions of bugzilla, an .htaccess file was used to redirect
+  # urls (often in the form of form:name or form.name) to different .cgi
+  # endpoints.
+  #
+  # Since the port to Mojolicious, we do this by adding additional routes.
+  # This is accomplished with a placeholder that we consistently prefix with
+  # REWRITE_, and as you can see below is followed by an arrayref mapping the
+  # (arbitrary) name to a regular expression and a destination.
+  #
+  # The REWRITE_ prefix is only significant because it is removed from the fake
+  # CGI environment in Bugzilla::App::CGI 
   $r->any('/:REWRITE_itrequest' => [REWRITE_itrequest => qr{form[\.:]itrequest}])
     ->to('CGI#enter_bug_cgi' =>
       {'product' => 'Infrastructure & Operations', 'format' => 'itrequest'});