forked from Rockachopa/Timmy-time-dashboard
committed by
GitHub
parent
11ba21418a
commit
82fb2417e3
@@ -116,9 +116,9 @@ class SecurityHeadersMiddleware(BaseHTTPMiddleware):
|
||||
|
||||
# HTTPS enforcement (production only)
|
||||
if self.production:
|
||||
response.headers[
|
||||
"Strict-Transport-Security"
|
||||
] = "max-age=31536000; includeSubDomains; preload"
|
||||
response.headers["Strict-Transport-Security"] = (
|
||||
"max-age=31536000; includeSubDomains; preload"
|
||||
)
|
||||
|
||||
async def dispatch(self, request: Request, call_next) -> Response:
|
||||
"""Add security headers to the response.
|
||||
|
||||
Reference in New Issue
Block a user