2017-08-23 5 views
0

Wie ich SSL auf Rack::Static website?Force-SSL auf Rack-:: Statische Website

zwingen kann

Das ist buchstäblich der gesamte Code-Basis:

use Rack::Static, 
    :urls => ["/images", "/js", "/css"], 
    :root => "public" 

run lambda { |env| 
    [ 
    200, 
    { 
     'Content-Type' => 'text/html', 
     'Cache-Control' => 'public, max-age=86400' 
    }, 
    File.open('public/index.html', File::RDONLY) 
    ] 
} 

Antwort

Verwandte Themen