我正在使用 Laravel 的开发版本 (4.1.*),并且有一个新的默认配置我不想要:X-Frame-Options: SAMEORIGIN
目前,我通过删除 Illuminate\Http\FrameGuard.php
文件中的一行代码来禁用它。
我正在寻找更好的解决方案。我已经尝试在 filtre.php
文件中:
App::after(function($request, $response) {
$response->header('X-Frame-Options', 'ALLOW-ALL');
});
但它只是添加了选项 (X-Frame-Options: ALLOW-ALL, SAMEORIGIN
),而我需要一个覆盖。