From 94050d7dde3e718b0613599838b4cbd9d517fbff Mon Sep 17 00:00:00 2001 From: Petrik Date: Mon, 21 Feb 2022 20:40:44 +0100 Subject: [PATCH] Move PermissionsPolicy docs to ActionDispatch::HTTP::PermissionsPolicy [ci-skip] As most of the PermissionsPolicy is defined in ActionDispatch::HTTP::PermissionsPolicy, it should include most of the documentation. ActionController::Metal::PermissionsPolicy should describe controller overrides. This PR also makes the documentation more similar to the ActionDispatch::HTTP::ContentSecurityPolicy documentation. Note: The Feature-Policy header has been renamed to Permissions-Policy in the specification. 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 in the documentation for now. Co-authored-by: Jonathan Hefner --- .../metal/permissions_policy.rb | 45 ++++++++----------- .../http/permissions_policy.rb | 16 +++++++ 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/actionpack/lib/action_controller/metal/permissions_policy.rb b/actionpack/lib/action_controller/metal/permissions_policy.rb index dff1c065f5..bf2ede48bf 100644 --- a/actionpack/lib/action_controller/metal/permissions_policy.rb +++ b/actionpack/lib/action_controller/metal/permissions_policy.rb @@ -1,37 +1,28 @@ # frozen_string_literal: true module ActionController # :nodoc: - # HTTP Permissions Policy is a web standard for defining a mechanism to - # allow and deny the use of browser permissions in its own context, and - # in content within any