class Lucky::ForceSSLHandler
- Lucky::ForceSSLHandler
- Reference
- Object
Overview
Enabled - The handler can be enabled/disabled. This is helpful for working in a local development environment.
Strict-Transport-Security - Settings to configure the 'Strict-Transport-Security' header
# Usually in config/force_ssl_handler.cr
Lucky::ForceSSLHandler.configure do |settings|
settings.redirect_status = 303
settings.enabled = false
settings.strict_transport_security = {max_age: 1.year, include_subdomains: true}
end
Included Modules
- Habitat::SettingsHelpers
- Habitat::TempConfig
- HTTP::Handler
Defined in:
lucky/force_ssl_handler.crConstant Summary
-
HABITAT_SETTINGS =
[{decl: redirect_status : Int32 = HTTP::Status::PERMANENT_REDIRECT.value, example: nil, validation: nil}, {decl: enabled : Bool, example: nil, validation: nil}, {decl: strict_transport_security : NamedTuple(max_age: Time::Span | Time::MonthSpan, include_subdomains: Bool) | ::Nil, example: nil, validation: nil}] of Nil