Commit 14e10a3 1 parent 0a1ebf7 commit 14e10a3 Copy full SHA for 14e10a3
File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,15 @@ func (s *Service) initRouter(ctx context.Context) {
30
30
r .Handle (s .Cfg .DeployURL + "/mon/metrics/all" , nil , r .GET (service .GetMetricsHandler ))
31
31
32
32
// proxypass
33
- r .Mux .PathPrefix (s .Cfg .DeployURL + "/cdsapi" ).Handler (s .getReverseProxy (s .Cfg .DeployURL + "/cdsapi" , s .Cfg .API .HTTP .URL ))
34
- r .Mux .PathPrefix (s .Cfg .DeployURL + "/cdshooks" ).Handler (s .getReverseProxy (s .Cfg .DeployURL + "/cdshooks" , s .Cfg .HooksURL ))
35
- r .Mux .PathPrefix (s .Cfg .DeployURL + "/cdscdn" ).Handler (s .getReverseProxy (s .Cfg .DeployURL + "/cdscdn" , s .Cfg .CDNURL ))
33
+ if s .Cfg .API .HTTP .URL != "" {
34
+ r .Mux .PathPrefix (s .Cfg .DeployURL + "/cdsapi" ).Handler (s .getReverseProxy (s .Cfg .DeployURL + "/cdsapi" , s .Cfg .API .HTTP .URL ))
35
+ }
36
+ if s .Cfg .HooksURL != "" {
37
+ r .Mux .PathPrefix (s .Cfg .DeployURL + "/cdshooks" ).Handler (s .getReverseProxy (s .Cfg .DeployURL + "/cdshooks" , s .Cfg .HooksURL ))
38
+ }
39
+ if s .Cfg .CDNURL != "" {
40
+ r .Mux .PathPrefix (s .Cfg .DeployURL + "/cdscdn" ).Handler (s .getReverseProxy (s .Cfg .DeployURL + "/cdscdn" , s .Cfg .CDNURL ))
41
+ }
36
42
37
43
// serve static UI files
38
44
r .Mux .PathPrefix ("/docs" ).Handler (s .uiServe (http .Dir (s .DocsDir ), s .DocsDir ))
You can’t perform that action at this time.
0 commit comments