mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #4925] feat: security response headers #13790
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?
Originally created by @phil-ogb on GitHub (Aug 27, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/4925
Is your feature request related to a problem? Please describe.
The application does not include critical security response headers such as HSTS, X-Frame-Options, X-Content-Type-Options, X-XSS-Protection, and Content-Security-Policy. This leaves the application potentially vulnerable to various security threats, including clickjacking, MIME type sniffing attacks, and cross-site scripting (XSS) attacks. Since our deployment is done through Helm charts and we can't set these headers on the ALB, we need a way to implement these headers within the application itself.
Describe the solution you'd like
It'd be great to have the following security response headers in the application through some middleware:
These headers should be toggleable using environment variables for production deployments. This will allow us to easily enable or disable specific headers as needed without modifying the application code.
The implementation should include:
Describe alternatives you've considered
Setting headers at the reverse proxy level: This is not feasible due to our Helm chart deployment and inability to set these on the ALB.
@tjbck commented on GitHub (Aug 27, 2024):
PR Welcome!
@phil-ogb commented on GitHub (Sep 17, 2024):
PR: https://github.com/open-webui/open-webui/pull/5466