From: Dylan Hardison Date: Fri, 22 Mar 2024 02:13:32 +0000 (-0700) Subject: (no bug) add a doc comment explaining the REWRITE_ stuff (#98) X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1a91fee1bb68fd374cdaa5b1e8474ae81d9a1ba0;p=thirdparty%2Fbugzilla.git (no bug) add a doc comment explaining the REWRITE_ stuff (#98) --- diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index 7350fbd79..ff587d478 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -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'});