Skip to content

Commit 3b8fd19

Browse files
committed
- Remove Rack:SSL
1 parent 30e794d commit 3b8fd19

4 files changed

Lines changed: 1 addition & 15 deletions

File tree

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
* [Displaying Additional File Types](#displaying-additional-file-types)
3333
* [Basic Authentication](#basic-authentication)
3434
* [Customizing Theme](#customizing-theme)
35-
* [Forcing HTTPS Connection](#forcing-https-connection)
3635
* [Docker Image](#docker-image)
3736

3837
## Install
@@ -334,15 +333,6 @@ If you are looking to implement a smaller CSS change, follow these steps:
334333
Note that this functionality is not guaranteed to stay as is in future
335334
versions of madness.
336335

337-
## Forcing HTTPS Connection
338-
339-
To have Madness redirect HTTP traffic to HTTPS, set this environment
340-
variable:
341-
342-
```shell
343-
$ export MADNESS_FORCE_SSL=1
344-
```
345-
346336
## Docker Image
347337

348338
Madness server is also available as a docker image.

lib/madness/browser.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ def initialize(host, port)
1212

1313
# Returns a URL based on host, port and MADNESS_FORCE_SSL.
1414
def server_url
15-
scheme = ENV['MADNESS_FORCE_SSL'] ? 'https' : 'http'
1615
url_host = ['0.0.0.0', '127.0.0.1'].include?(host) ? 'localhost' : host
17-
"#{scheme}://#{url_host}:#{port}"
16+
"http://#{url_host}:#{port}"
1817
end
1918

2019
# Returns true if the server is running. Will attempt to connect

lib/madness/server_base.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# require 'sinatra/reloader'
2-
require 'rack/ssl'
32
require 'sinatra/base'
43
require 'slim'
54

@@ -12,7 +11,6 @@ class ServerBase < Sinatra::Application
1211
helpers ServerHelper
1312

1413
Slim::Engine.set_options pretty: true
15-
use Rack::SSL if ENV['MADNESS_FORCE_SSL']
1614
set :root, File.expand_path('../../', __dir__)
1715
set :environment, ENV['MADNESS_ENV'] || :production
1816
set :server, :puma

madness.gemspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Gem::Specification.new do |s|
2424
s.add_runtime_dependency 'naturally', '~> 2.2'
2525
s.add_runtime_dependency 'os', '~> 1.0'
2626
s.add_runtime_dependency 'puma', '~> 5.1'
27-
s.add_runtime_dependency 'rack-ssl', '~> 1.4'
2827
s.add_runtime_dependency 'requires', '~> 0.1'
2928
s.add_runtime_dependency 'sinatra', '~> 2.0', '>= 2.0.5'
3029
s.add_runtime_dependency 'slim', '~> 4.0'

0 commit comments

Comments
 (0)