Laravel remove header values from API response

Viewed 6187

Laravel App Version 5.6 i wish to remove the value private from the Cache-Control Header which is presented in the API response

enter image description here

i have a middleware that is adding the "no-cache" and "no-store" values

    $response = $next($request);
    $response->headers->set('Cache-Control', 'no-cache, no-store');
    return $response;

is it possible to do it in the same Middleware or any other work around

EDIT1 : in PHP.ini i have left the value "session.cache_limiter" empty, made sure .htacess is not appending headers and changed my middleware to do the following

$response->headers->remove('Cache-Control');
$response->headers->set('Cache-Control', 'no-cache, no-store');

still getting the private value in the header.

0 Answers
Related