Uploaded image for project: 'Z-Push'
  1. Z-Push
  2. ZP-1373

USE_CUSTOM_REMOTE_IP_HEADER not working with Apache

    Details

    • Type: Bug
    • Status: QA
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.4.1 beta1, 2.4.1
    • Component/s: None
    • Labels:
      None

      Description

      The apache with modphp function apache_request_headers() changes header names, removing the leading HTTP and replacing underscores with dashes.

      When setting USE_CUSTOM_REMOTE_IP_HEADER  with the suggested parameters the headers can not be found and the IP address of proxy is used, potentially blocking all requests (in combination with fail2ban).

      As workaround the configured header name should be changed, using: 

      X-FORWARDED-FOR

      instead of

      HTTP_X_FORWARDED_FOR

      and

      X-REAL-IP

      instead of

      HTTP_X_REAL_IP

      The full headers do work in environments with php-fpm!

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Sebastian Sebastian Kummer
                Reporter:
                Sebastian Sebastian Kummer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: