Skip to content

Exposed Symfony-Session-NoAutoCacheControl header when sessions are disabled #512

@Tobion

Description

@Tobion

The UserContextListener sets the Symfony-Session-NoAutoCacheControl header. But if a project does not even use sessions and disabled it, then the \Symfony\Component\HttpKernel\EventListener\SessionListener is not active. And thus also does not remove this header again. So FOSHttpCacheBundle should not set this header when sessions are not enabled in

$response->headers->set(AbstractSessionListener::NO_AUTO_CACHE_CONTROL_HEADER, 1);
and
$response->headers->set(AbstractSessionListener::NO_AUTO_CACHE_CONTROL_HEADER, 1);

Otherwise it exposes this header to the outside.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions