Skip to content

Replace individual CDN file proxying with catch-all /libs/ path#34

Open
jakewski wants to merge 2 commits intomasterfrom
proxy-cdn-libs-catch-all
Open

Replace individual CDN file proxying with catch-all /libs/ path#34
jakewski wants to merge 2 commits intomasterfrom
proxy-cdn-libs-catch-all

Conversation

@jakewski
Copy link

Summary

  • Replaced individual /lib.min.js, /lib.js location blocks and the deprecated /decide block with a single /libs/ catch-all that proxies all files to cdn.mxpnl.com/libs/
  • This supports the new lib_base_path SDK config option, which dynamically loads async modules (recorder, targeting, etc.) from a configurable base path — no more need to whitelist individual files
  • Updated README description and docs link

Test plan

  • Deploy the updated nginx config and verify GET /libs/mixpanel-2-latest.min.js returns the SDK from cdn.mxpnl.com
  • Verify async module loading works (e.g. GET /libs/mixpanel-recorder-*.min.js)
  • Verify API tracking requests still proxy correctly through /
  • Confirm nginx -t passes with the new config

🤖 Generated with Claude Code

jakewski and others added 2 commits March 11, 2026 18:55
Instead of whitelisting specific files (lib.min.js, lib.js) and the
deprecated /decide endpoint, proxy all files under /libs/ to
cdn.mxpnl.com/libs/. This supports the new `lib_base_path` SDK config
option which dynamically loads async modules (recorder, targeting, etc.)
from a configurable base path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant