Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

add support for appending no-cache to Cache-Control header #35720

Copy link
Copy link
Closed
@anadimisra

Description

@anadimisra
Issue body actions

Description
While using Symphony in Laravel, we set response headers for GET requests through a middleware cache.headers

Route::resource('blogs', 'BlogPostController')->except('create','edit')->middleware('cache.headers:private;max_age=86400;etag');

If I add no_cache then it breaks the response, and I get the error

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

The error led me to following block of code in Symfony\Component\HttpFoundation

if ($diff = array_diff(array_keys($options), ['etag', 'last_modified', 'max_age', 's_maxage', 'private', 'public', 'immutable'])) {
throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', $diff)));
}

adding no_cache support will be really helpful.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.