File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ def set_security_headers() -> Dict[str, str]:
2828 - x-frame-options
2929 - x-permitted-cross-domain-policies
3030 - content-security-policy
31+ - reporting-endpoints
3132
3233 Each environment variable is associated with a specific setter function
3334 that constructs the header. If the environment variable is set, the
@@ -47,6 +48,7 @@ def set_security_headers() -> Dict[str, str]:
4748 "XFRAME_OPTIONS" : set_xframe ,
4849 "XPERMITTED_CROSS_DOMAIN_POLICIES" : set_xpermitted_cross_domain_policies ,
4950 "CONTENT_SECURITY_POLICY" : set_content_security_policy ,
51+ "REPORTING_ENDPOINTS" : set_reporting_endpoints ,
5052 }
5153
5254 for env_var , setter in header_setters .items ():
@@ -131,3 +133,8 @@ def set_xpermitted_cross_domain_policies(value: str):
131133# Set Content-Security-Policy response header
132134def set_content_security_policy (value : str ):
133135 return {"Content-Security-Policy" : value }
136+
137+
138+ # Set Reporting-Endpoints response header
139+ def set_reporting_endpoints (value : str ):
140+ return {"Reporting-Endpoints" : value }
You can’t perform that action at this time.
0 commit comments