Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web UI base path #14787

Closed
wants to merge 12 commits into from
Closed

Web UI base path #14787

wants to merge 12 commits into from

Conversation

kharenis
Copy link

Adds a base path configuration for the WebUI.
This can be used for easy setup alongside reverse proxies that determine a backend based on the path.
(See #5693 Feature request)

When a request is received, it'll strip out the base path if found (in order to preserve the API/file structure) and insert the base path with a 303 redirect if not found.

The base path is now being injected into the client-side code to ensure everything gets routed correctly.

Changing the value requires the WebUI to be restarted, as when the value is changed there were redirection issues upon saving the new value, and I thought this would be the safest way of approaching it.

qbittorrent-webui
qbittorrent-gui

This will be removed upon every request. This is to allow easy reverse proxy filtering on the path level.
Adds a base path configuration option to the WebUI.
WebApplication injects base path into content paths on initial
configuration. Requires a restart to update.
Internally, the path is stripped from the request to maintain the
existing api/file structure.
Requests without the path trigger a 303 redirect response.
Closes qbittorrent#5693
Empty file was being returned when a trailing slash on the base path
was missing
Fixed typo in prior commit
Removed unecessary VS file
Converted UTF-8 BOM to UTF-8 on appropriate files
Added space before closing /
Updated 'Base Path' to 'Base path' to match the other labels
@glassez glassez added WebUI WebUI-related issues/changes Core labels Apr 14, 2021
Replace is now done against relative paths to improve
maintainability.
Base path with now be written as a static path to avoid
conflicts where the original request path ends with a /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core WebUI WebUI-related issues/changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants