Skip to content

Commit

Permalink
Disable interest-cohort for privacy reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
tbille committed Apr 15, 2021
1 parent 6a5b0cb commit 0b22c02
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions canonicalwebteam/flask_base/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,18 @@ def set_cache_control_headers(response):
return response


def set_permissions_policy_headers(response):
"""
Sets default permissions policies. This disable some browsers features
and APIs.
"""
# Disabling interest-cohort for privacy reasons.
# https://wicg.github.io/floc/
response.headers["Permissions-Policy"] = "interest-cohort=()"

return response


class FlaskBase(flask.Flask):
def __init__(
self,
Expand Down

0 comments on commit 0b22c02

Please sign in to comment.