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 {
3333 director := func (req * http.Request ) {
3434 // Figure out which server to redirect to based on the incoming request.
3535 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" ):
3744 target = cdn
38- } else {
45+ default :
3946 target = trackingAPI
4047 }
4148
You can’t perform that action at this time.
0 commit comments