class PermissionsPolicy
Ruby on Rails 8.0.4
Since v6.1.7.10Action Dispatch PermissionsPolicy
Configures the HTTP Feature-Policy response header to specify which browser features the current document and its iframes can use.
Example global policy:
Rails.application.config.permissions_policy do |policy| policy.camera :none policy.gyroscope :none policy.microphone :none policy.usb :none policy.fullscreen :self policy.payment :self, "https://secure.example.com" end
The Feature-Policy header has been renamed to Permissions-Policy. The Permissions-Policy requires a different implementation and isn’t yet supported by all browsers. To avoid having to rename this middleware in the future we use the new name for the middleware but keep the old header name and implementation for now.
Inherits from
Namespace
Modules
Classes
Constants
Attributes
Methods (defined here)
- # build
- # initialize_copy
- self. new
Private methods
(5)
Implementation detail — not part of the public API.
Methods (inherited)
From Object (17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # with
- # with_options
From ActiveSupport::NumericWithFormat (2)
- # to_formatted_s
- # to_fs