Sinatra helpers to set the HTTP "Vary
" header.
Author: Philipp Kempgen, http://kempgen.net
Usage
Include the module in your Sinatra application:
helpers ::Sinatra::Helpers::HTTP::Vary
Example:
vary! 'Accept'
vary! 'Accept-Language'
# headers['Vary'] is now "Accept, Accept-Language"
Example:
vary! '*'
# headers['Vary'] is now "*"
Example:
vary! '*'
vary! 'Accept-Language'
# headers['Vary'] is now "*"
Example:
vary! 'Accept-Language'
vary! '*'
# headers['Vary'] is now "*"