Skip to content

Conversation

@bbeiler-ridgeline
Copy link

@bbeiler-ridgeline bbeiler-ridgeline commented Oct 22, 2025

This pull request adds support for specifying a custom root path for the DocStrange web interface, improving flexibility for deployments under subpaths (such as behind a reverse proxy). The changes include new CLI options, updates to user instructions and output, and configuration in the web server to honor the root path.

CLI enhancements

  • Added a --root-path argument to the CLI, allowing users to specify a custom root path for the web interface (e.g., /docstrange). This is only used with the web command.

Web server configuration

  • Updated the run_web_app function in docstrange/web_app.py to accept a root_path argument and configure the Flask application’s APPLICATION_ROOT accordingly. This ensures proper routing when the app is served under a subpath.
  • Pass the root_path value to the static content (index.html, script.js) so that the frontend can hit the proper endpoints

Static Content

  • Updated the index.html (template) to store the root_path for use on frontend resources
  • Updated script.js to use the root_path if present (fallback to '') to make calls to the proper api location

@Siddhant011 @prats226

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants