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:
Target branch: Please verify that the pull request targets the dev branch.
Description: Provide a concise description of the changes made in this pull request.
Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
Testing: Have you written and run sufficient tests for validating the changes?
Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
Prefix: To cleary categorize this pull request, prefix the pull request title, using one of the following:
BREAKING CHANGE: Significant changes that may affect compatibility
build: Changes that affect the build system or external dependencies
ci: Changes to our continuous integration processes or workflows
chore: Refactor, cleanup, or other non-functional code changes
docs: Documentation update or addition
feat: Introduces a new feature or enhancement to the codebase
fix: Bug fix or error correction
i18n: Internationalization or localization changes
perf: Performance improvement
refactor: Code restructuring for better maintainability, readability, or scalability
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
test: Adding missing tests or correcting existing tests
WIP: Work in progress, a temporary label for incomplete or ongoing work
What is added here is on frontend side possibility to have path on server url from where open-webui is served. Ie. https://<server> can with these changes be augmented with https://<server><open webui serving path>
where that base <open webui serving path> path is coming from svelte.config.js:
Here basically all urls on frontend side are augmented with the additional path, and for static served files starting slash is removed, e.g. "/static/something" -> "static/something"
Additional Information
I tried to test this thoroughly, I expect I don't break anything for current state (unless that change on static paths does something on some situations, those can be augmented with same base path if seen needed). I ran this on localhost with no base path and everything did work as before. Then I ran this through apache with adding base path and everything did work equally on my setup. My test setup with apache is with two machines. Machine A is where apache is forwarding http and ws traffic coming to http://<my server><open webui serving pach> into port, this port is forwarded to machine B. On machine B I have Open WebUI running and answering to that forwarded port.
On both cases (localhost/through apache) on browser console everything seems good, there are no errors reported on my tests.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/10440
**Author:** [@juhapekka](https://github.com/juhapekka)
**Created:** 2/20/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `localdev`
---
### 📝 Commits (1)
- [`e7e0c77`](https://github.com/open-webui/open-webui/commit/e7e0c776c2898ff7808b69035adc4cd9652ba93b) frontend: enable relative path
### 📊 Changes
**55 files changed** (+146 additions, -124 deletions)
<details>
<summary>View changed files</summary>
📝 `src/app.html` (+9 -9)
📝 `src/lib/components/NotificationToast.svelte` (+1 -1)
📝 `src/lib/components/admin/Functions.svelte` (+1 -1)
📝 `src/lib/components/admin/Functions/FunctionEditor.svelte` (+2 -1)
📝 `src/lib/components/admin/Settings/Models.svelte` (+1 -1)
📝 `src/lib/components/admin/Users.svelte` (+1 -1)
📝 `src/lib/components/admin/Users/Groups.svelte` (+1 -1)
📝 `src/lib/components/app/AppSidebar.svelte` (+2 -2)
📝 `src/lib/components/channel/Channel.svelte` (+1 -1)
📝 `src/lib/components/channel/Thread.svelte` (+1 -1)
📝 `src/lib/components/chat/Chat.svelte` (+5 -5)
📝 `src/lib/components/chat/MessageInput/CallOverlay.svelte` (+6 -6)
📝 `src/lib/components/chat/MessageInput/Commands/Models.svelte` (+1 -1)
📝 `src/lib/components/chat/ModelSelector/Selector.svelte` (+3 -2)
📝 `src/lib/components/chat/Settings/Chats.svelte` (+2 -2)
📝 `src/lib/components/chat/SettingsModal.svelte` (+2 -1)
📝 `src/lib/components/common/Banner.svelte` (+3 -2)
📝 `src/lib/components/layout/Overlay/AccountPending.svelte` (+3 -2)
📝 `src/lib/components/layout/Sidebar.svelte` (+3 -3)
📝 `src/lib/components/layout/Sidebar/ArchivedChatsModal.svelte` (+2 -1)
_...and 35 more files_
</details>
### 📄 Description
# Pull Request Checklist
### Note to first-time contributors: Please open a discussion post in [Discussions](https://github.com/open-webui/open-webui/discussions) and describe your changes before submitting a pull request.
**Before submitting, make sure you've checked the following:**
- [x] **Target branch:** Please verify that the pull request targets the `dev` branch.
- [x] **Description:** Provide a concise description of the changes made in this pull request.
- [ ] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
- [ ] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
- [ ] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation?
- [x] **Testing:** Have you written and run sufficient tests for validating the changes?
- [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
- [x] **Prefix:** To cleary categorize this pull request, prefix the pull request title, using one of the following:
- **BREAKING CHANGE**: Significant changes that may affect compatibility
- **build**: Changes that affect the build system or external dependencies
- **ci**: Changes to our continuous integration processes or workflows
- **chore**: Refactor, cleanup, or other non-functional code changes
- **docs**: Documentation update or addition
- **feat**: Introduces a new feature or enhancement to the codebase
- **fix**: Bug fix or error correction
- **i18n**: Internationalization or localization changes
- **perf**: Performance improvement
- **refactor**: Code restructuring for better maintainability, readability, or scalability
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
- **test**: Adding missing tests or correcting existing tests
- **WIP**: Work in progress, a temporary label for incomplete or ongoing work
# Changelog Entry
### Description
This pull request relate to discussion happening here https://github.com/open-webui/open-webui/discussions/3431
What is added here is on frontend side possibility to have path on server url from where open-webui is served. Ie. https://\<server\> can with these changes be augmented with https://\<server\>\<open webui serving path\>
where that base \<open webui serving path\> path is coming from svelte.config.js:
```
const config = {
...
kit: {
...
paths: {
base: '<path>'
}
}
};
```
### Changed
Here basically all urls on frontend side are augmented with the additional path, and for static served files starting slash is removed, e.g. "/static/something" -\> "static/something"
---
### Additional Information
I tried to test this thoroughly, I expect I don't break anything for current state (unless that change on static paths does something on some situations, those can be augmented with same base path if seen needed). I ran this on localhost with no base path and everything did work as before. Then I ran this through apache with adding base path and everything did work equally on my setup. My test setup with apache is with two machines. Machine A is where apache is forwarding http and ws traffic coming to http://\<my server\>\<open webui serving pach\> into port, this port is forwarded to machine B. On machine B I have Open WebUI running and answering to that forwarded port.
On both cases (localhost/through apache) on browser console everything seems good, there are no errors reported on my tests.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/10440
Author: @juhapekka
Created: 2/20/2025
Status: ❌ Closed
Base:
dev← Head:localdev📝 Commits (1)
e7e0c77frontend: enable relative path📊 Changes
55 files changed (+146 additions, -124 deletions)
View changed files
📝
src/app.html(+9 -9)📝
src/lib/components/NotificationToast.svelte(+1 -1)📝
src/lib/components/admin/Functions.svelte(+1 -1)📝
src/lib/components/admin/Functions/FunctionEditor.svelte(+2 -1)📝
src/lib/components/admin/Settings/Models.svelte(+1 -1)📝
src/lib/components/admin/Users.svelte(+1 -1)📝
src/lib/components/admin/Users/Groups.svelte(+1 -1)📝
src/lib/components/app/AppSidebar.svelte(+2 -2)📝
src/lib/components/channel/Channel.svelte(+1 -1)📝
src/lib/components/channel/Thread.svelte(+1 -1)📝
src/lib/components/chat/Chat.svelte(+5 -5)📝
src/lib/components/chat/MessageInput/CallOverlay.svelte(+6 -6)📝
src/lib/components/chat/MessageInput/Commands/Models.svelte(+1 -1)📝
src/lib/components/chat/ModelSelector/Selector.svelte(+3 -2)📝
src/lib/components/chat/Settings/Chats.svelte(+2 -2)📝
src/lib/components/chat/SettingsModal.svelte(+2 -1)📝
src/lib/components/common/Banner.svelte(+3 -2)📝
src/lib/components/layout/Overlay/AccountPending.svelte(+3 -2)📝
src/lib/components/layout/Sidebar.svelte(+3 -3)📝
src/lib/components/layout/Sidebar/ArchivedChatsModal.svelte(+2 -1)...and 35 more files
📄 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
This pull request relate to discussion happening here https://github.com/open-webui/open-webui/discussions/3431
What is added here is on frontend side possibility to have path on server url from where open-webui is served. Ie. https://<server> can with these changes be augmented with https://<server><open webui serving path>
where that base <open webui serving path> path is coming from svelte.config.js:
Changed
Here basically all urls on frontend side are augmented with the additional path, and for static served files starting slash is removed, e.g. "/static/something" -> "static/something"
Additional Information
I tried to test this thoroughly, I expect I don't break anything for current state (unless that change on static paths does something on some situations, those can be augmented with same base path if seen needed). I ran this on localhost with no base path and everything did work as before. Then I ran this through apache with adding base path and everything did work equally on my setup. My test setup with apache is with two machines. Machine A is where apache is forwarding http and ws traffic coming to http://<my server><open webui serving pach> into port, this port is forwarded to machine B. On machine B I have Open WebUI running and answering to that forwarded port.
On both cases (localhost/through apache) on browser console everything seems good, there are no errors reported on my tests.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.