Documentssuperset
Reverse Proxy Configuration
Reverse Proxy Configuration
Type
Topic
Status
Published
Created
Jul 20, 2026
Updated
Jul 20, 2026

Reverse Proxy Configuration#

Running Superset behind a reverse proxy (Nginx, Apache, AWS ELB, etc.) requires coordinating configuration on both the proxy and the Superset application layers. The two primary concerns are: (1) telling Superset to trust and parse X-Forwarded-* headers from the proxy, and (2) sizing the proxy's request body limit appropriately.


ENABLE_PROXY_FIX and PROXY_FIX_CONFIG#

By default, ENABLE_PROXY_FIX = False . When set to True in superset_config.py, Superset wraps the Flask WSGI app with Werkzeug's ProxyFix middleware . This causes Flask to reconstruct the correct scheme, host, and client IP from the upstream headers rather than the raw socket values.

The companion setting PROXY_FIX_CONFIG controls how many trusted hops to accept for each header :

KeyHeader trusted
x_forX-Forwarded-For (client IP)
x_protoX-Forwarded-Proto (http/https)
x_hostX-Forwarded-Host
x_portX-Forwarded-Port
x_prefixX-Forwarded-Prefix (URL path prefix)

Each value is the number of trusted proxy hops (default: 1 for each). When proxying to a different port, set "x_port": 0 to avoid downstream redirect issues .

When to enable: Any time a load balancer or proxy is injecting X-Forwarded-For / X-Forwarded-Proto headers. This is required for correct OAuth redirect URI computation and for generating accurate HTTPS URLs .


Nginx Reference Configuration#

Superset's Docker setup ships two Nginx config files:

  • docker/nginx/nginx.conf — global Nginx settings: client_max_body_size 10m , gzip compression, keepalive tuning.
  • docker/nginx/templates/superset.conf.template — virtual server template. Key proxy headers set on the main location block :
    • proxy_set_header X-Real-IP $remote_addr
    • proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for
    • proxy_set_header X-Forwarded-Proto $scheme
    • proxy_connect_timeout 300 (for long-running queries)

The template also routes WebSocket connections to the Node-based async messaging server on port 8080 .

Request body size: The default client_max_body_size is 10 MB . Uploads larger than this (e.g. large CSV imports or dashboard exports) will be rejected by Nginx with HTTP 413 before reaching Superset. Increase this value in nginx.conf or a server-level override as needed.


Apache Webserver#

When using Apache as the reverse proxy and terminating TLS, explicitly forward the protocol header :

RequestHeader set X-Forwarded-Proto "https"

Without this, X-Forwarded-Proto may be absent and Superset will generate http:// URLs even when users are accessing over HTTPS.


TLS Offloading and Internal Traffic#

When a proxy terminates TLS, Superset receives plain HTTP internally. Key implications:

  • ENABLE_PROXY_FIX = True is required so Flask sees the correct https scheme .
  • SESSION_COOKIE_SECURE (default False, ) — setting this to True while Celery workers call Superset over plain HTTP will cause session cookies to be silently dropped, breaking Alerts & Reports screenshot generation.
  • WEBDRIVER_BASEURL (default http://0.0.0.0:8080/, ) is the internal URL Celery workers use; keep this as an http:// URL if TLS is terminated at the proxy.
  • WEBDRIVER_BASEURL_USER_FRIENDLY should be set to the external HTTPS URL so notification emails contain valid links .

Kubernetes / Helm#

In Helm deployments, set ENABLE_PROXY_FIX via configOverrides to ensure SSL offloading works correctly with ingress controllers :

configOverrides:
  my_override: |
    ENABLE_PROXY_FIX = True

Key Source Files#

FilePurpose
superset/config.pyENABLE_PROXY_FIX and PROXY_FIX_CONFIG defaults
superset/initialization/__init__.pyProxyFix middleware registration
docker/nginx/nginx.confclient_max_body_size, gzip, global settings
docker/nginx/templates/superset.conf.templatePer-server proxy header forwarding
docs/configuration/configuring-superset.mdxOfficial docs: HTTPS config, load balancer section
Reverse Proxy Configuration | Dosu