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

set Flask APPLICATION_ROOT the same to base_url in airflow.cfg

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Hello,

      I tried to setup airflow in a restricted host, all web interface has to be exposed via a reverse proxy like:

      https://server_ip/fixed_prefix/airflow/

      The reversed proxy is setup properly, airflow homepage was displayed, but some of the AJAX API calls failed.

      Open chrome console shows

      /admin/airflow/blocked was 404 not found

      The code was like

      d3.json("/admin/airflow/blocked", function(error, json) {
      $.each(json, function() {

      The template source code was on airflow/www/templates/airflow/list_dags.html

      stroke_width_hover = 6;
      d3.json("{{ url_for('airflow.dag_stats') }}", function(error, json) {
      for(var dag_id in json) {
      states = json[dag_id];

      So I am wondering if we can change Flask's app.config["APPLICATION_ROOT"] to the same as

      [webserver]
      baseurl = /fixed_prefix/airflow/

      found in airflow.cfg

      Thanks in advance.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lambdaq lambdaq
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: