Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-6549

Configuration related to reverse proxy is loaded using wrong data type.

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.10.7
    • Fix Version/s: None
    • Component/s: configuration
    • Labels:
      None

      Description

      The configuration management system is loading the variables related to reverse proxy fix handling with the wrong format, example with the following configuration :

       

      enable_proxy_fix = True
      proxy_fix_x_for = 1
      proxy_fix_x_proto = 1
      proxy_fix_x_host = 1
      proxy_fix_x_port = 1
      proxy_fix_x_prefix = 1
      

      When running the webserver, a 500 is returned with the following stacktrace:

       

      TypeError: '>=' not supported between instances of 'int' and 'str'
        File "flask/app.py", line 2463, in __call__
          return self.wsgi_app(environ, start_response)
        File "werkzeug/middleware/proxy_fix.py", line 195, in __call__
          x_for = self._get_trusted_comma(self.x_for, environ_get("HTTP_X_FORWARDED_FOR"))
        File "werkzeug/middleware/proxy_fix.py", line 166, in _get_trusted_comma
          if len(values) >= trusted:
      

      When analysic local variable (thanks Sentry), I can see that trusted is equal to '1' (as string) and not 1 (as int) as it should be.

       

      This makes the usage of reverse proxy impossible.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned Assign to me
              Reporter:
              kedare Mathieu Poussin

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment