braze-inc / braze-web-sdk

Public repo for the Braze Web SDK
https://www.braze.com
Other
71 stars 25 forks source link

Network requests going to both https://sdk.iad-03.appboy.com/ & https://sdk.iad-03.braze.com/ #64

Closed sukritchhabra closed 4 years ago

sukritchhabra commented 4 years ago

Setup

Issue

Noticing POST requests for /data going to both https://sdk.iad-03.appboy.com/ & https://sdk.iad-03.braze.com/.

The only difference I observed with the call to https://sdk.iad-03.appboy.com/ is that some custom events were being sent there. All other calls for /sync and /data still going to https://sdk.iad-03.braze.com/.

Also don't see it going consistently. Only able to see it sporadically. And not able to spot while running on localhost.

Don't see the https://sdk.iad-03.appboy.com/ listed here so just wanted to make sure if this is valid, what api's trigger this and if this is configurable?

froodian commented 4 years ago

I would expect to see the SDK make POST requests only to the location configured in baseUrl, or to the default location of https://sdk.iad-01.braze.com/api/v3 when baseUrl is not provided. sdk.iad-03.appboy.com definitely does not appear in the Braze Web SDK and never has.

Are you certain you don't have any other activity calling initialize with the sdk.iad-03.appboy.com domain? Or is it possible there's a second integration of the SDK on your page through a third-party partner SDK such as mparticle or segment which is being configured with that baseUrl?

If you can provide an accessible instance of a site which is displaying this behavior it's possible that I could debug further.

sukritchhabra commented 4 years ago

Yeah looks like it was another service that was loading mParticle. Anything we can do on our end to stop this from happening or will need to be configured from mParticle?

froodian commented 4 years ago

Glad you managed to track that down! I believe it has to be configured on the mParticle side. Practically speaking sdk.iad-03.braze.com and sdk.iad-03.appboy.com are going to redirect to the same production servers feeding the same data processing queues, and if we ever end up fully removing sdk.iad-03.appboy.com it will be after much warning and proactive communication (there are no plans to do so currently that I'm aware of) so it's more a cleanliness issue than an urgent correctness issue.

Given that everything looks ok on the SDK side, I'm going to close out this issue. :)

sukritchhabra commented 4 years ago

Gotcha, thanks 👍