Merge from Dev to LOAF Production #23
@@ -6340,8 +6340,9 @@ async def add_security_headers(request: Request, call_next):
|
||||
for header, value in security_headers.items():
|
||||
response.headers[header] = value
|
||||
|
||||
# Remove server identification headers
|
||||
response.headers.pop("Server", None)
|
||||
# Remove server identification headers (use del, not pop for MutableHeaders)
|
||||
if "Server" in response.headers:
|
||||
del response.headers["Server"]
|
||||
|
||||
return response
|
||||
|
||||
|
||||
Reference in New Issue
Block a user