From 44784ce04cd9d5fd7f50eda9fdadc3f4b4d35d8d Mon Sep 17 00:00:00 2001 From: Jorge Aleman gonzalez Date: Wed, 13 May 2026 11:47:50 +0200 Subject: [PATCH] nginx: forward Authorization and Content-Encoding for flags & replay - Forward client Authorization header to api.mixpanel.com (fixes /flags 401 per SDK docs). - Pass Content-Encoding from upstream for Session Replay. - Set client_max_body_size 10m to match Mixpanel nginx example. Refs: https://docs.mixpanel.com/docs/tracking-methods/sdks/javascript#tracking-via-proxy Co-authored-by: Cursor --- nginx.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nginx.conf b/nginx.conf index 501e0fc..79efe9b 100644 --- a/nginx.conf +++ b/nginx.conf @@ -17,6 +17,9 @@ http { proxy_set_header X-Real-IP $http_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $server_name; + proxy_set_header Authorization $http_authorization; + proxy_pass_header Content-Encoding; + client_max_body_size 10m; proxy_pass https://api.mixpanel.com/; } }