Skip to content

Instantly share code, notes, and snippets.

@jagwire
Created July 8, 2016 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jagwire/3f9f11b4699a815909c559561d9d93cd to your computer and use it in GitHub Desktop.
Save jagwire/3f9f11b4699a815909c559561d9d93cd to your computer and use it in GitHub Desktop.
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