Skip to content

Commit

Permalink
Replaced feature-policy by permission-policy and removed unused hints.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonarnes committed Feb 23, 2021
1 parent 04d9207 commit 2bd0f46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Model/Plugins/Framework/Controller/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ public function afterRenderResult(ResultInterface $subject, ResultInterface $res
ScopeInterface::SCOPE_STORE
);

$response->setHeader('Accept-CH', 'viewport-width, width, device-memory, dpr, rtt, downlink, ect');
$response->setHeader('Feature-Policy', "ch-viewport-width {$imageEngineUrl};ch-width {$imageEngineUrl};ch-dpr {$imageEngineUrl};ch-device-memory {$imageEngineUrl};ch-rtt {$imageEngineUrl};ch-ect {$imageEngineUrl};ch-downlink {$imageEngineUrl}");
$response->setHeader('Accept-CH', 'viewport-width, width, dpr, ect');
$response->setHeader('Permissions-Policy', "ch-viewport-width=(\"{$imageEngineUrl}\"), ch-width=(\"{$imageEngineUrl}\"), ch-dpr=(\"{$imageEngineUrl}\"), ch-ect=(\"{$imageEngineUrl}\"), ch-downlink=(\"{$imageEngineUrl}\")");
$response->setHeader('link', "<{$imageEngineUrl}>; rel=preconnect");
$response->setHeader('access-control-allow-headers', 'Origin, X-Requested-With, Content-Type, Accept, rtt');
$response->setHeader('access-control-allow-headers', 'Origin, X-Requested-With, Content-Type, Accept');
}

return $result;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"require": {
"php": "~7.1.0|~7.2.0|~7.3.0|~7.4.0"
},
"version": "1.0.19",
"version": "1.0.20",
"license": "MIT",
"type": "magento2-module",
"autoload": {
Expand Down

0 comments on commit 2bd0f46

Please sign in to comment.