Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
require 'rubygems'
require 'sinatra'
set :public, { File.join(root, "_site") }
# This before filter ensures that your pages are only ever served
# once (per deploy) by Sinatra, and then by Varnish after that
before do
response.headers['Cache-Control'] = 'public, max-age=31557600' # 1 year
get '/' do'_site/index.html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.