Created
March 4, 2017 00:52
-
-
Save stefansedich/c762085787f2131b61ba9ccd9659f5e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra/base' | |
class Application < Sinatra::Base | |
configure do | |
set :bind, '0.0.0.0' | |
set :port, 4567 | |
end | |
get '/' do | |
response.headers['Access-Control-Allow-Origin'] = '*' | |
sleep 60 | |
'Hello, SSL.' | |
end | |
def self.run! | |
super do |server| | |
server.ssl = true | |
server.ssl_options = { | |
:verify_peer => false | |
} | |
end | |
end | |
run! if app_file == $0 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment