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

Support the X-Redirect-By header

XMLWordPrintable

    • MOODLE_39_STABLE
    • MOODLE_39_STABLE
    • MDL-67403-x-redirect-by
    • Hide

      1) Curl any page which sends a redirect eg:

      curl -v http://moodle.local/admin/

       

      Look for the header returned:

      < HTTP/1.1 303 See Other 
      < Date: Thu, 28 Nov 2019 11:47:37 GMT 
      < Server: Apache/2.4.29 (Ubuntu) 
      ...
      < X-Redirect-By: Moodle 
      < Location: http://moodle.local/admin/index.php?cache=1
      

      Show
      1) Curl any page which sends a redirect eg: curl -v http://moodle.local/admin/   Look for the header returned: < HTTP/1.1 303 See Other < Date: Thu, 28 Nov 2019 11:47:37 GMT < Server: Apache/2.4.29 (Ubuntu) ... < X-Redirect-By: Moodle < Location: http://moodle.local/admin/index.php?cache=1

      This is a super simple defacto spec which was suggested by Yoast and implemented in wordpress.

      https://developer.yoast.com/x-redirect-by-header/

      It helps when you have a complicated stack and are debugging redirect issues and it's not clear from the outside which layer in the stack is performing the redirect. Redirects themselves are pretty light so it's a minor data burden overall. It makes more sense if it's always on and not behind a debugging type switch.

        1. x-redirect-by.png
          137 kB
          Eloy Lafuente (stronk7)

            brendanheywood Brendan Heywood
            brendanheywood Brendan Heywood
            Dan Marsden Dan Marsden
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 35 minutes
                35m

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