From 1a91fee1bb68fd374cdaa5b1e8474ae81d9a1ba0 Mon Sep 17 00:00:00 2001 From: Dylan Hardison Date: Thu, 21 Mar 2024 19:13:32 -0700 Subject: [PATCH] (no bug) add a doc comment explaining the REWRITE_ stuff (#98) --- extensions/BMO/Extension.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) 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'}); -- 2.47.2