Laravel App版本5.6 我希望从API响应中显示的Cache-Control标头中删除私有值
我有一个中间件,正在添加“无缓存”和“无存储”值
$response = $next($request);
$response->headers->set('Cache-Control', 'no-cache, no-store');
return $response;
是否有可能在相同的中间件或其他任何替代方法中完成
EDIT1: 在PHP.ini中,我将“ session.cache_limiter”值留为空白,确保.htacess未附加标题,并更改了中间件以执行以下操作
$response->headers->remove('Cache-Control');
$response->headers->set('Cache-Control', 'no-cache, no-store');
仍然在标头中获取私有值。