Class: Itsi::Server::Config::RedirectHttpToHttps
- Inherits:
-
Option
- Object
- Option
- Itsi::Server::Config::RedirectHttpToHttps
show all
- Defined in:
- lib/itsi/server/config/options/redirect_http_to_https.rb
Class Method Summary
collapse
Instance Method Summary
collapse
included, #initialize, load_and_register, #normalize_keys!
Class Method Details
.option_name ⇒ Object
14
15
16
|
# File 'lib/itsi/server/config/options/redirect_http_to_https.rb', line 14
def self.option_name
:redirect_http_to_https!
end
|
Instance Method Details
#build! ⇒ Object
18
19
20
21
22
23
24
25
26
|
# File 'lib/itsi/server/config/options/redirect_http_to_https.rb', line 18
def build!
location.instance_eval do
location protocols: [:http] do
redirect \
to: "https://{host}{path_and_query}", \
type: "moved_permanently"
end
end
end
|