Browse Source

fix: redirect /tree

Zhang Li 1 year ago
parent
commit
4760687574
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dag-jupyter/internal/api/helm-wrapper.go

+ 1 - 1
dag-jupyter/internal/api/helm-wrapper.go

@@ -38,7 +38,7 @@ func genParam(req *types.CreateJupyterInfo) map[string]interface{} {
 
 		settings = append(settings, fmt.Sprintf("ingress.jupyterlab.annotations.kubernetes\\.io/ingress\\.class=%s", req.IngressClass))
 		settings = append(settings, fmt.Sprintf("ingress.jupyterlab.annotations.nginx\\.ingress\\.kubernetes\\.io/proxy-body-size=%s", "8192m"))
-		settings = append(settings, fmt.Sprintf("ingress.jupyterlab.annotations.nginx\\.ingress\\.kubernetes\\.io/configuration-snippet=|\n\trewrite %s/tree http://%s%s/lab permanent;", req.Path, req.Host, req.Path))
+		settings = append(settings, fmt.Sprintf("ingress.jupyterlab.annotations.nginx\\.ingress\\.kubernetes\\.io/configuration-snippet=rewrite %s/tree http://%s%s/lab permanent;", req.Path, req.Host, req.Path))
 	}
 	if req.NodeSelector != "" {
 		if strings.HasPrefix(strings.TrimSpace(req.NodeSelector), "aihub-dag") {