feat(API): Add root path support for web interface #38
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
--root-pathargument to the CLI, allowing users to specify a custom root path for the web interface (e.g.,/docstrange). This is only used with thewebcommand.Web server configuration
run_web_appfunction indocstrange/web_app.pyto accept aroot_pathargument and configure the Flask application’sAPPLICATION_ROOTaccordingly. This ensures proper routing when the app is served under a subpath.root_pathvalue to the static content (index.html, script.js) so that the frontend can hit the proper endpointsStatic Content
@Siddhant011 @prats226