How to set up Vary HTTP header in Symfony2 web app?

445 Views Asked by At

In my Symfony2 web app, I need to set up Vary HTTP header for User-Agent, like in this link,

https://developers.google.com/webmasters/smartphone-sites/details?hl=en

Does any know how to do this ?

1

There are 1 best solutions below

1
On BEST ANSWER

You can use the @Cache annotation, or you can set headers directly on a Response object.

http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/cache.html