Skip to content

Commit 7ad5015

Browse files
authored
Merge pull request #4365 from segmentio/prigiattiperrut-patch-2
Add the API proxy address for EU workspaces
2 parents 7895cb5 + d72c2e0 commit 7ad5015

File tree

1 file changed

+8
-5
lines changed
  • src/connections/sources/catalog/libraries/website/javascript

1 file changed

+8
-5
lines changed

src/connections/sources/catalog/libraries/website/javascript/custom-proxy.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ You need to set up two important parts, regardless of the CDN provider you use:
2525
- Proxy to Segment CDN (`cdn.segment.com`)
2626
- Proxy to Segment tracking API (`api.segment.io`)
2727

28-
> info " "
28+
> warning ""
29+
> If you are using a [Regional Workspace](/docs/guides/regional-segment/#client-side-sources), please note that instead of using `api.segment.io` to proxy the Tracking API, you'll be using `events.eu1.segmentapis.com`
30+
31+
> info ""
2932
> Segment only has the ability to enable the proxy setting for the Web (Analytics.js) source. Details for mobile source proxies are in the [Analytics for iOS](/docs/connections/sources/catalog/libraries/mobile/ios/#proxy-https-calls) and [Analytics for Android](/docs/connections/sources/catalog/libraries/mobile/android/#proxying-http-calls) documentation. It is not currently possible to set up a proxy for server sources using the Segment UI.
3033
3134
## Set up
@@ -59,9 +62,9 @@ A Segment Customer Success team member will respond that they have enabled this
5962
## Custom CDN / API Proxy
6063

6164
### Snippet instructions
62-
If you're a snippet user, you need to modify the [analytics snippet](/docs/getting-started/02-simple-install/#step-1-copy-the-snippet) that's inside your `<head>`.
65+
If you're a snippet user, you need to modify the [analytics snippet](/docs/getting-started/02-simple-install/#step-1-copy-the-snippet) that's inside your `<head>`.
6366

64-
To proxy settings and destination requests that typically go to `http://cdn.segment.com`, replace:
67+
To proxy settings and destination requests that typically go to `http://cdn.segment.com`, replace:
6568
```diff
6669
- t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js"
6770
+ t.src="https://MY-CUSTOM-CDN-PROXY.com" + key + "/analytics.min.js"
@@ -85,7 +88,7 @@ const analytics = AnalyticsBrowser.load({
8588
// https://MY-CUSTOM-CDN-PROXY.com/v1/project/<writekey>/settings
8689
// GET https://cdn.segment.com/next-integrations/actions/...js ->
8790
// https://MY-CUSTOM-CDN-PROXY.com/next-integrations/actions/...js
88-
cdnURL: 'https://MY-CUSTOM-CDN-PROXY.com'
91+
cdnURL: 'https://MY-CUSTOM-CDN-PROXY.com'
8992
})
9093
```
9194

@@ -100,7 +103,7 @@ const analytics = AnalyticsBrowser.load(
100103
integrations: {
101104
'Segment.io': {
102105
// POST https://api.segment.io/v1/t -> https://MY-CUSTOM-API-PROXY.com/t
103-
apiHost: 'MY-CUSTOM-API-PROXY.com' // omit the protocol (http/https) e.g. "api.segment.io/v1" rather than "https://api.segment.io/v1"
106+
apiHost: 'MY-CUSTOM-API-PROXY.com' // omit the protocol (http/https) e.g. "api.segment.io/v1" rather than "https://api.segment.io/v1"
104107
}
105108
}
106109
}

0 commit comments

Comments
 (0)