[PR #2211] [MERGED] chore: add HTTP-Referer and X-Title headers for Open WebUI #36558

Closed
opened 2026-04-25 10:22:57 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/2211
Author: @arsaboo
Created: 5/12/2024
Status: Merged
Merged: 5/13/2024
Merged by: @tjbck

Base: devHead: header


📝 Commits (9)

  • b8d7fdf Merge pull request #1965 from open-webui/dev
  • 9f2b846 Merge pull request #2101 from open-webui/dev
  • 61ffbf5 Merge pull request #2114 from open-webui/dev
  • 78c2f16 Merge pull request #2115 from open-webui/dev
  • 943c49a Merge pull request #2116 from open-webui/dev
  • 734e62b Merge pull request #2117 from open-webui/dev
  • 90503be Merge pull request #2118 from open-webui/dev
  • 6671e5f chore: add HTTP-Referer and X-Title headers for Open WebUI
  • bd82334 chore: add additional headers only for Openrouter

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 backend/apps/openai/main.py (+3 -1)

📄 Description

Pull Request Checklist

  • Target branch: Pull requests should target the dev branch.
  • Description: Briefly describe the changes 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 the changes?
  • Code Review: Have you self-reviewed your code and addressed any coding standard issues?

Description

Added X-Title and HTTP-Referer in the header to capture the information in the providers' dashboards such as Openrouter. Right now, this is how it appears:

image


Changelog Entry

Added

  • [List any new features, functionalities, or additions]

Fixed

  • [List any fixes, corrections, or bug fixes]

Changed

  • Added X-Title and HTTP-Referer in the OpenAI request header

Removed

  • [List any removed features, files, or deprecated functionalities]

Security

  • [List any new or updated security-related changes, including vulnerability fixes]

Breaking Changes

  • [List any breaking changes affecting compatibility or functionality]

Additional Information

  • [Insert any additional context, notes, or explanations for the changes]

  • [Reference any related issues, commits, or other relevant information]


🔄 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/2211 **Author:** [@arsaboo](https://github.com/arsaboo) **Created:** 5/12/2024 **Status:** ✅ Merged **Merged:** 5/13/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `header` --- ### 📝 Commits (9) - [`b8d7fdf`](https://github.com/open-webui/open-webui/commit/b8d7fdf16e57deaf7faaa4dad7c2c5666e8b18ed) Merge pull request #1965 from open-webui/dev - [`9f2b846`](https://github.com/open-webui/open-webui/commit/9f2b846ea7201c320851f78c3a4620408921684c) Merge pull request #2101 from open-webui/dev - [`61ffbf5`](https://github.com/open-webui/open-webui/commit/61ffbf5b5b82829a7d0d248cbc6e03b350d4b634) Merge pull request #2114 from open-webui/dev - [`78c2f16`](https://github.com/open-webui/open-webui/commit/78c2f16c3cc0465930b55f5ac8ab07d90f582ead) Merge pull request #2115 from open-webui/dev - [`943c49a`](https://github.com/open-webui/open-webui/commit/943c49a07ae01198566611ef5931ef108d3584a0) Merge pull request #2116 from open-webui/dev - [`734e62b`](https://github.com/open-webui/open-webui/commit/734e62b865165a54b2717586d3041e157dc5c579) Merge pull request #2117 from open-webui/dev - [`90503be`](https://github.com/open-webui/open-webui/commit/90503be2edef1a1f7ce2074286b6316d5cb8868a) Merge pull request #2118 from open-webui/dev - [`6671e5f`](https://github.com/open-webui/open-webui/commit/6671e5f17083552f000f9ca69d41e4ab9a7d0cd6) chore: add HTTP-Referer and X-Title headers for Open WebUI - [`bd82334`](https://github.com/open-webui/open-webui/commit/bd823346478772087772d574229acf93a8bb77cd) chore: add additional headers only for Openrouter ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/apps/openai/main.py` (+3 -1) </details> ### 📄 Description ## Pull Request Checklist - [x] **Target branch:** Pull requests should target the `dev` branch. - [x] **Description:** Briefly describe the changes in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [x] **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 the changes? - [x] **Code Review:** Have you self-reviewed your code and addressed any coding standard issues? --- ## Description Added `X-Title` and `HTTP-Referer` in the header to capture the information in the providers' dashboards such as Openrouter. Right now, this is how it appears: ![image](https://github.com/open-webui/open-webui/assets/18319734/2beb7c04-0816-46eb-a9ea-06e243af6263) --- ### Changelog Entry ### Added - [List any new features, functionalities, or additions] ### Fixed - [List any fixes, corrections, or bug fixes] ### Changed - Added `X-Title` and `HTTP-Referer` in the OpenAI request header ### Removed - [List any removed features, files, or deprecated functionalities] ### Security - [List any new or updated security-related changes, including vulnerability fixes] ### Breaking Changes - [List any breaking changes affecting compatibility or functionality] --- ### Additional Information - [Insert any additional context, notes, or explanations for the changes] - [Reference any related issues, commits, or other relevant information] --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 10:22:57 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#36558