Dont run csp locally
This commit is contained in:
parent
9a27697984
commit
465c15f012
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,7 @@ namespace App\Http\Middleware;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
|
||||||
class CSPHeader
|
class CSPHeader
|
||||||
{
|
{
|
||||||
|
@ -16,6 +17,10 @@ class CSPHeader
|
||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
|
if (App::environment('local', 'development')) {
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
|
||||||
// headers have to be single-line strings,
|
// headers have to be single-line strings,
|
||||||
// so we concat multiple lines
|
// so we concat multiple lines
|
||||||
// phpcs:disable Generic.Files.LineLength.TooLong
|
// phpcs:disable Generic.Files.LineLength.TooLong
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue