Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
require 'rubygems'
require 'sinatra'
set :port, 80
set :bind, '0.0.0.0'
get "/*" do
host = request.host
path = request.path
redirect "https://#{host}#{path}";
end
post "/*" do
host = request.host
path = request.path
redirect "https://#{host}#{path}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment