散景:更改 /static 的端点
Bokeh: change the endpoints for /static
有没有办法更改在 Bokeh 中提供静态 JS 文件的端点?
- 我有许多从负载均衡器后面访问的散景仪表板
- 对 https://myloadbalancer/{dashboard_name} 的任何请求都会发送到负载均衡器
- 负载均衡器然后根据 /{dashboard_name}
的值将请求路由到正确的仪表板服务器
- 对于任何给定的仪表板,bokeh 然后会尝试通过 https:///myloadbalancer/static
访问静态 javascript
- 为此,我需要创建一个新的散景服务器来提供静态文件,然后配置负载均衡器以将请求路由到 https://myloadbalancer/static 到新服务器
- 这种方法很好,直到您开始在不同的仪表板中获得不同的 javascript 依赖关系
- 有谁知道更改散景仪表板的 /static 路径的方法。例如,它从 https://myloadbalancer/{dashboard_name}/static?
读取静态文件
您可以 运行 带有选项 --prefix <base_path>
的 bokeh serve
命令。这会将 <base_path>
放在向 Bokeh (Torando) Web 服务器请求的每个资源后面,这也适用于 /static 资源。
在这里您可以找到 official Bokeh documentation page。
亲切的问候
有没有办法更改在 Bokeh 中提供静态 JS 文件的端点?
- 我有许多从负载均衡器后面访问的散景仪表板
- 对 https://myloadbalancer/{dashboard_name} 的任何请求都会发送到负载均衡器
- 负载均衡器然后根据 /{dashboard_name} 的值将请求路由到正确的仪表板服务器
- 对于任何给定的仪表板,bokeh 然后会尝试通过 https:///myloadbalancer/static 访问静态 javascript
- 为此,我需要创建一个新的散景服务器来提供静态文件,然后配置负载均衡器以将请求路由到 https://myloadbalancer/static 到新服务器
- 这种方法很好,直到您开始在不同的仪表板中获得不同的 javascript 依赖关系
- 有谁知道更改散景仪表板的 /static 路径的方法。例如,它从 https://myloadbalancer/{dashboard_name}/static? 读取静态文件
您可以 运行 带有选项 --prefix <base_path>
的 bokeh serve
命令。这会将 <base_path>
放在向 Bokeh (Torando) Web 服务器请求的每个资源后面,这也适用于 /static 资源。
在这里您可以找到 official Bokeh documentation page。
亲切的问候