Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-69779

Improved the X-Redirect-By header when debugging is on

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE
    • MDL-69779-better-x-redirect-by
    • Hide
      1. Start with debugging off
      2. Open the browser dev tools, access to the network tab and check the "Preserve log" box (Chrome)
      3. Login to your Moodle site (it will perform a redirect)
      4. Looking at the "Network" tab in your browser, find for a page with 303 status code, click over the content in the "Name" column and confirm you can see a simple 'X-Redirect-By: Moodle' in the "Response header" section
      5. Turn debugging up to develop
      6. Repeat and confirm you can now see the path and line number of the code that triggered the redirect eg: X-Redirect-By: Moodle /index.php:73
      Show
      Start with debugging off Open the browser dev tools, access to the network tab and check the "Preserve log" box (Chrome) Login to your Moodle site (it will perform a redirect) Looking at the "Network" tab in your browser, find for a page with 303 status code, click over the content in the "Name" column and  confirm you can see a simple 'X-Redirect-By: Moodle' in the "Response header" section Turn debugging up to develop Repeat and confirm you can now see the path and line number of the code that triggered the redirect eg: X-Redirect-By: Moodle /index.php:73

      Just improves MDL-67403 if the debug level is set to developer by adding not only the fact that Moodle did the redirect (as opposed to say nginx or a load balancer elsewhere in the stack) but also the exact file and line that triggered the redirect. This can help immensely in environments where you cannot live debug but have to track down redirect loops or multi redirect hops that could be simplified.

            brendanheywood Brendan Heywood
            brendanheywood Brendan Heywood
            Peter Burnett Peter Burnett
            Victor Déniz Falcón Victor Déniz Falcón
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 10 minutes
                2h 10m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.