Add ability to add user-specified paths to not redirect

Created on 8 October 2019, almost 5 years ago
Updated 23 June 2024, 3 months ago

It would be handy to be able to specify paths that would *not* be redirected. For example, I monitor our sites with Nagios, which uses a particular path on the site. Currently, using Maintenance Mode Redirect, when the site is in maintenance mode, the nagios path is redirected, which errors Nagios reporting. If it was possible to specify paths to be excluded from redirection, we could use this module without disabling Nagios reporting when in Maintenance Mode.

Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇸United States Ben Coleman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇬🇧United Kingdom aaron.ferris

    Ill look at implementing this.

  • Merge request !5Issue #3086569: add custom allowed paths → (Merged) created by aaron.ferris
  • 🇬🇧United Kingdom aaron.ferris

    Initial code change for this is in the MR, flat paths at the moment - need to add an option for any 'Path starts with'.

    Also had some issues with fatals in this module, namely:

    Error: Class "Url" not found in maintenance_mode_redirect_help() (line 17 of /var/www/html/web/modules/contrib/maintenance_mode_redirect-3086569/maintenance_mode_redirect.module).

    TypeError: Drupal\maintenance_mode_redirect\EventSubscriber\MaintenanceModeRedirectSubscriber::checkForRedirection(): Argument #1 ($event) must be of type Drupal\maintenance_mode_redirect\EventSubscriber\GetResponseEvent, Symfony\Component\HttpKernel\Event\RequestEvent given in Drupal\maintenance_mode_redirect\EventSubscriber\MaintenanceModeRedirectSubscriber->checkForRedirection() (line 32 of /var/www/html/web/modules/contrib/maintenance_mode_redirect-3086569/src/EventSubscriber/MaintenanceModeRedirectSubscriber.php).

    Both should be fixed in the attached MR.

  • Issue was unassigned.
  • Status changed to Needs review 4 months ago
  • Status changed to RTBC 4 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I reviewed the code and I didn't find anything wrong.
    I noticed that the configuration values have names that are prefixed by the module name, but that should be fixed in a different issue.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    apaderno changed the visibility of the branch 2.x to hidden.

  • Status changed to Fixed 4 months ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024