Last active
April 20, 2021 05:46
-
-
Save andrewdalpino/91c8415e2e43bf3fc2b84dd82d450764 to your computer and use it in GitHub Desktop.
Sets the Permissions-policy response header. By default, opt out of 'interest cohorts' a.k.a. targeted advertising.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Middleware; | |
use Illuminate\Http\Request; | |
class PermissionsPolicy | |
{ | |
/** | |
* Handle the request and return a response. | |
* | |
* @param \Illuminate\Http\Request $request | |
* @param callable $next | |
*/ | |
public function handle(Request $request, callable $next) | |
{ | |
return $next($request)->header('Permissions-Policy', 'interest-cohort=()'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment