-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can api_host
contain a /path?
#408
Comments
Looking through the code samples where https://github.com/search?q=repo%3Amixpanel%2Fmixpanel-js+path%3Asrc%2F*+api_host&type=code |
Your example ( |
Yes, I'm just saying that you shouldn't rely on that behavior, as it's an implementation detail and might change without warning in future versions. The safer config for you would be: mixpanel.init(`my token`, {
api_host: `https://much-proxy.wow`,
api_routes: {
track: `m/foo`, // https://much-proxy.wow/m/foo
engage: `m/bar`, // https://much-proxy.wow/m/bar
groups: `m/baz`, // https://much-proxy.wow/m/baz
},
)); |
Can the
api_host
parameter be set to a directory instead of just a host? I skimmed the code and that appears to be the case, but I just wanted to confirm.Would this work as expected
Would all requests within the client be sent to
much-proxy.wow/m
?The text was updated successfully, but these errors were encountered: