无论如何要为 prestosql web UI 配置一个 URL 前缀
anyway to configure a URL prefix for prestosql web UI
鉴于 prestosql 集群已启动并监听 localhost:8080
,我发现它将请求重定向到 http://localhost:8080/ui/
> curl -v http://localhost:8080/
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0
> Accept: */*
> Referer:
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 303 See Other
< Date: Thu, 02 Jul 2020 14:07:10 GMT
< Location: http://localhost:8080/ui/
< Content-Length: 0
是否支持像 /prestosql
这样的前缀,以便它可以将请求从 /prestosql
重定向到 /prestosql/ui
而不是 /ui/
?
该场景是关于在 prestosql 前面使用网关,然后通过 URL 重写路由请求。例如,Nginx/HAProxy 或 Istio 虚拟服务。
这是不可能的,需要做很多工作,因为 Presto 的 UI HTML 和 javascript 代码需要在 /ui/...
路径上提供各种资源。
鉴于 prestosql 集群已启动并监听 localhost:8080
,我发现它将请求重定向到 http://localhost:8080/ui/
> curl -v http://localhost:8080/
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0
> Accept: */*
> Referer:
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 303 See Other
< Date: Thu, 02 Jul 2020 14:07:10 GMT
< Location: http://localhost:8080/ui/
< Content-Length: 0
是否支持像 /prestosql
这样的前缀,以便它可以将请求从 /prestosql
重定向到 /prestosql/ui
而不是 /ui/
?
该场景是关于在 prestosql 前面使用网关,然后通过 URL 重写路由请求。例如,Nginx/HAProxy 或 Istio 虚拟服务。
这是不可能的,需要做很多工作,因为 Presto 的 UI HTML 和 javascript 代码需要在 /ui/...
路径上提供各种资源。