class Kemal::Config
- Kemal::Config
- Reference
- Object
Overview
Stores all the configuration options for a Kemal application. It's a singleton and you can access it like.
Kemal.config
Defined in:
kemal/config.crConstant Summary
-
CUSTOM_HANDLERS =
[] of Tuple(Nil | Int32, HTTP::Handler)
-
ERROR_HANDLERS =
{} of Int32 => (HTTP::Server::Context, Exception -> String)
-
FILTER_HANDLERS =
[] of HTTP::Handler
-
HANDLERS =
[] of HTTP::Handler
-
INSTANCE =
Config.new
Constructors
Instance Method Summary
- #add_error_handler(status_code : Int32, &handler : HTTP::Server::Context, Exception -> _)
- #add_filter_handler(handler : HTTP::Handler)
- #add_handler(handler : HTTP::Handler)
- #add_handler(handler : HTTP::Handler, position : Int32)
- #always_rescue : Bool
- #always_rescue=(always_rescue)
- #clear
- #env : String
- #env=(env)
- #error_handlers
- #extra_options(&extra_options : OptionParser -> )
- #extra_options : OptionParser -> Nil?
- #extra_options=(extra_options)
- #handlers
- #handlers=(handlers : Array(HTTP::Handler))
- #host_binding : String
- #host_binding=(host_binding)
- #logger
- #logger=(logger : Kemal::BaseLogHandler)
- #logging : Bool
- #logging=(logging)
- #port : Int32
- #port=(port)
- #powered_by_header : Bool
- #powered_by_header=(powered_by_header : Bool)
- #public_folder : String
- #public_folder=(public_folder)
- #running : Bool
- #running=(running)
- #scheme
- #serve_static : Bool | Hash(String, Bool)
- #serve_static=(serve_static : Bool | Hash(String, Bool))
- #server : HTTP::Server?
- #server=(server : HTTP::Server?)
- #setup
- #shutdown_message : Bool
- #shutdown_message=(shutdown_message)
- #ssl : OpenSSL::SSL::Context::Server?
- #ssl=(ssl)
- #static_headers : HTTP::Server::Response, String, File::Info -> Void?
- #static_headers=(static_headers : HTTP::Server::Response, String, File::Info -> Void?)
Constructor Detail
Instance Method Detail
def add_error_handler(status_code : Int32, &handler : HTTP::Server::Context, Exception -> _)
#
def static_headers=(static_headers : HTTP::Server::Response, String, File::Info -> Void?)
#