Skip to content

Instantly share code, notes, and snippets.

@httpsx
Last active November 12, 2021 19:29
Show Gist options
  • Save httpsx/9396336c8d9204152240cf8720b26e48 to your computer and use it in GitHub Desktop.
Save httpsx/9396336c8d9204152240cf8720b26e48 to your computer and use it in GitHub Desktop.
Enable SSL ruby thin + sinatra + websocket
# Path to Rack -> /root/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/rack-2.2.3/lib/rack/handler/thin.rb
# change
server = ::Thin::Server.new(*args)
# ->
server = ::Thin::Server.new(*args)
server.ssl = true
server.ssl_options = {
:private_key_file => "path to ssl.key",
:cert_chain_file => "path to ssl.crt"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment