Feature-/Permissions-Policy HTTP header update (#15667)

Removed features that were removed from the 'Feature-Policy' spec (vibrate, speaker). List of valid features can be found here: https://github.com/w3c/webappsec-permissions-policy/blob/master/features.md

Due to a recent rename of the policy I've copied the Feature-Policy to a Permissions-Policy header and changed the value syntax. For backwards compatibility I recommend leaving the 'Feature-Policy' for now.

Syntax errors found using: https://www.uriports.com/score/home-assistant.io
This commit is contained in:
Freddie Leeman 2020-11-17 16:25:03 +01:00 committed by GitHub
parent e309fee8d8
commit 710e7aa940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,8 @@
/* /*
Cache-Control: public, max-age: 0, s-maxage=3600, must-revalidate Cache-Control: public, max-age: 0, s-maxage=3600, must-revalidate
Content-Security-Policy: form-action https: Content-Security-Policy: form-action https:
Feature-Policy: vibrate 'none'; geolocation 'none'; midi 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; speaker 'none'; vibrate 'none'; payment 'none' Feature-Policy: geolocation 'none'; midi 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; payment 'none'
Permissions-Policy: geolocation=(), midi=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), payment=()
Referrer-Policy: no-referrer-when-downgrade Referrer-Policy: no-referrer-when-downgrade
X-Content-Type-Options: nosniff X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block X-XSS-Protection: 1; mode=block