jorge_dev96
2 months ago
200
1
Laravel

Response does not support the following options: "no-cache".

Posted 2 months ago by jorge_dev96

I want to use the cache-controll headers in Laravel 5.8 I followed this tutorial

https://itnext.io/laravel-the-hidden-setcacheheaders-middleware-4cd594ba462f

So I create put a middleware in my / route

Route::get('/', function () {
    return view('welcome');
})->middleware('cache.headers:no-cache,private,max-age=300;etag');

But I get this error Response does not support the following options: "no-cache".

What should I do?

Please sign in or create an account to participate in this conversation.