File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,16 @@ func NewSegmentReverseProxy(cdn *url.URL, trackingAPI *url.URL) http.Handler {
33
33
director := func (req * http.Request ) {
34
34
// Figure out which server to redirect to based on the incoming request.
35
35
var target * url.URL
36
- if strings .HasPrefix (req .URL .String (), "/v1/projects" ) || strings .HasPrefix (req .URL .String (), "/analytics.js/v1" ) {
36
+ switch {
37
+ case strings .HasPrefix (req .URL .String (), "/v1/projects" ):
38
+ fallthrough
39
+ case strings .HasPrefix (req .URL .String (), "/analytics.js/v1" ):
40
+ fallthrough
41
+ case strings .HasPrefix (req .URL .String (), "/next-integrations" ):
42
+ fallthrough
43
+ case strings .HasPrefix (req .URL .String (), "/analytics-next/bundles" ):
37
44
target = cdn
38
- } else {
45
+ default :
39
46
target = trackingAPI
40
47
}
41
48
You can’t perform that action at this time.
0 commit comments