Enhancement: provide security middleware #3829
Labels
Enhancement
This is a new feature or request
Middleware
This is related to our middleware
Security
This is related to our security features
Summary
Django has a middleware that should always be used: https://docs.djangoproject.com/en/3.0/ref/middleware/#module-django.middleware.security
I think that Litestar should also have it out of the box.
What it does? It provide security-related headers for the responses.
X-Content-Type-Options: nosniff
Referrer-Policy: no-referrer
header (also supports other values: https://docs.djangoproject.com/en/3.0/ref/middleware/#referrer-policy)There are also 3rd party django libs that also work in the same field:
Permissions-Policy
headerMaybe something else that I forgot about?
All things should be customizable and work the regular way Litestar middleware works.
If others agree, I can work on this :)
Basic Example
No response
Drawbacks and Impact
No response
Unresolved questions
No response
Note
While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.
Check out all issues funded or available for funding on our Polar.sh dashboard
The text was updated successfully, but these errors were encountered: