mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-31 14:00:34 -05:00
[PR #5466] [MERGED] feat: security response headers #92730
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/5466
Author: @phil-ogb
Created: 9/17/2024
Status: ✅ Merged
Merged: 9/17/2024
Merged by: @tjbck
Base:
dev← Head:add-security-response-headers📝 Commits (2)
499e5e4feat: security response headers896baf0update comment block📊 Changes
2 files changed (+123 additions, -0 deletions)
View changed files
📝
backend/open_webui/main.py(+3 -0)➕
backend/open_webui/utils/security_headers.py(+120 -0)📄 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
Introduced a middleware to enhance the security of web applications by adding configurable HTTP security headers. These headers can be used to mitigate various common web vulnerabilities and improve the overall security posture of the application.
Added
CACHE_CONTROLenvironment variable.REFERRER_POLICYenvironment variable.HSTSenvironment variable.XFRAME_OPTIONSenvironment variable to specify options.XCONTENT_TYPEenvironment variable.XDOWNLOAD_OPTIONSenvironment variable.XPERMITTED_CROSS_DOMAIN_POLICIESenvironment variable.Screenshots or Videos
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.