Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
starlight_help: Forward to help_center_port in case of dev server.
Shubham Padia3f6520e82a0d
diff --git a/templates/zerver/development/dev_tools.html b/templates/zerver/development/dev_tools.htmlindex afc7aeb743a..eff8296f8ef 100644--- a/templates/zerver/development/dev_tools.html+++ b/templates/zerver/development/dev_tools.html@@ -173,6 +173,14 @@want to visualize the changes quickly in the beta help center documentation. You will need theconverted MDX files to be already generated through<code>./tools/convert-help-center-docs-to-mdx</code> before you run the dev server with this flag.++ <ul>+ <li>+ The dev server makes a bunch of request to base Zulip URL instead of scoping it to the astro/starlight+ base url. For this reason, we run the dev server on it's own port and redirect help center requests to+ the appropriate port (9995 by default).+ </li>+ </ul></li></ul></div>diff --git a/tools/run-dev b/tools/run-devindex 23057a13cd2..4bb0ff80af1 100755--- a/tools/run-dev+++ b/tools/run-dev@@ -345,11 +345,13 @@ The instructions for the build step can be found in the `./devtools`page. `/starlight_help` urls will give you an error until you complete thebuild step and rerun `run-dev`.""")elif enable_help_center_dev_server:++ async def redirect_help(request: web.Request) -> web.HTTPFound:+ return web.HTTPFound(request.url.with_port(help_center_port))+app.add_routes([- web.route(- hdrs.METH_ANY, r"/{path:(starlight_help).*}", partial(forward, help_center_port)- ),+ web.route(hdrs.METH_ANY, r"/{path:(starlight_help).*}", redirect_help),])app.add_routes(