FriendsOfSymfony / FOSJsRoutingBundle

A pretty nice way to expose your Symfony routing to client applications.
1.48k stars 261 forks source link

Disable auto cache control header #392

Closed alexsegura closed 1 year ago

alexsegura commented 4 years ago

Hi.

When the fos_js_routing_js route is behind a firewall, the cache control config is ignored.

HTTP Caching and User Sessions

Whenever the session is started during a request, Symfony turns the response into a private non-cacheable response. This is the best default behavior to not cache private user information (e.g. a shopping cart, a user profile details, etc.) and expose it to other visitors.

As this route will most probably never be dependent on user session, I think it's safe to disable this behavior 🙂

tobias-93 commented 1 year ago

Thanks @alexsegura