Add Feature-Policy header
The header has been renamed to Permissions-Policy, but Rails has no support so far.
This commit is contained in:
@ -1,12 +1,26 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# Define an application-wide HTTP permissions policy. For further
|
# Define an application-wide HTTP permissions policy. For further
|
||||||
# information see https://developers.google.com/web/updates/2018/06/feature-policy
|
# information see https://developers.google.com/web/updates/2018/06/feature-policy
|
||||||
#
|
# TODO: Feature-Policy has been renamed to Permissions-Policy. The Permissions-Policy is
|
||||||
# Rails.application.config.permissions_policy do |f|
|
# not yet supported by Rails (even though the new name is already used for the method)
|
||||||
# f.camera :none
|
Rails.application.config.permissions_policy do |policy|
|
||||||
# f.gyroscope :none
|
policy.accelerometer :none
|
||||||
# f.microphone :none
|
policy.ambient_light_sensor :none
|
||||||
# f.usb :none
|
policy.autoplay :none
|
||||||
# f.fullscreen :self
|
policy.camera :none
|
||||||
# f.payment :self, "https://secure.example.com"
|
policy.encrypted_media :none
|
||||||
# end
|
policy.fullscreen :none
|
||||||
|
policy.geolocation :none
|
||||||
|
policy.gyroscope :none
|
||||||
|
policy.magnetometer :none
|
||||||
|
policy.microphone :none
|
||||||
|
policy.midi :none
|
||||||
|
policy.payment :none
|
||||||
|
policy.picture_in_picture :none
|
||||||
|
# The `speaker` directive is used for selection of non-default audio output devices
|
||||||
|
policy.speaker :none
|
||||||
|
policy.usb :none
|
||||||
|
policy.vibrate :none
|
||||||
|
policy.vr :none
|
||||||
|
end
|
||||||
|
Reference in New Issue
Block a user