mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #15581] [CLOSED] feat: prepare for subpath #23876
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15581
Author: @guenhter
Created: 7/8/2025
Status: ❌ Closed
Base:
dev← Head:prepare-for-subpath📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
The request of hosting Open WebUI under a subpath (e.g. http://localhost/foobar/) is not new. Some attempt were already done in the past, but non of them made it: https://github.com/open-webui/open-webui/pull/10440, https://github.com/open-webui/open-webui/pull/2148, https://github.com/open-webui/open-webui/pull/1701
All of them tried the same approach: Changing the OWUI to relative paths.
Using relative paths is a critical thing, because we'd have to consider a lot of edge cases. Having absolute paths is here way more robust and easy to develop.
This PR prepares now everything that subpathing can be done quite easy with only a few minor steps. So it is then very easy to host OWUI not longer directly under
"/"but e.g. under"/some/".It is important, that paths always stays absolute paths.
If no base-path is defined, nothing changes. All the paths stay exactly as they are!
Subpathing will be done with those (manual) steps:
index.htmland some generated.jsfile)When this PR gets merged, I'll create a new PR in the docs repo to give some guideline what needs to be done to make the subpath work.
Changed
Screenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.