adamchainz / django-permissions-policy

Set the draft security HTTP header Permissions-Policy (previously Feature-Policy) on your Django app.
MIT License
98 stars 6 forks source link

Removed `interest-cohort` is still referenced in README #275

Closed sshishov closed 2 years ago

sshishov commented 2 years ago

Python Version

3.7.12

Django Version

2.2.27

Package Version

4.8.0

Description

Feature interest-cohort has been deleted in the latest release but it is still listed under README.

Copy-pasting the settings from README, leading to the not working solution:

  File "/home/docker/venv/lib/python3.7/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
    return WSGIHandler()
  File "/home/docker/venv/lib/python3.7/site-packages/django/core/handlers/wsgi.py", line 135, in __init__
    self.load_middleware()
  File "/home/docker/venv/lib/python3.7/site-packages/django/core/handlers/base.py", line 37, in load_middleware
    mw_instance = middleware(handler)
  File "/home/docker/venv/lib/python3.7/site-packages/django_permissions_policy/__init__.py", line 83, in __init__
    self.header_value  # Access at setup so ImproperlyConfigured can be raised
  File "/home/docker/venv/lib/python3.7/site-packages/django/utils/functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/home/docker/venv/lib/python3.7/site-packages/django_permissions_policy/__init__.py", line 101, in header_value
    raise ImproperlyConfigured(f"Unknown feature {feature}")
django.core.exceptions.ImproperlyConfigured: Unknown feature interest-cohort

Could you please update the README for the supported features

P.S. also cannot find in the spec this feature: ch-ua-wow64. Checked here

adamchainz commented 2 years ago

Done. Next time please just open a PR for a one line change like this.

P.S. also cannot find in the spec this feature: ch-ua-wow64. Checked here

The spec is normally out of date with the hints shipped in Chrome. I don't always know what they are.