class Kemal::Config

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.cr

Constant 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

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def add_error_handler(status_code : Int32, &handler : HTTP::Server::Context, Exception -> _) #

[View source]
def add_filter_handler(handler : HTTP::Handler) #

[View source]
def add_handler(handler : HTTP::Handler) #

[View source]
def add_handler(handler : HTTP::Handler, position : Int32) #

[View source]
def always_rescue : Bool #

[View source]
def always_rescue=(always_rescue) #

[View source]
def clear #

[View source]
def env : String #

[View source]
def env=(env) #

[View source]
def error_handlers #

[View source]
def extra_options(&extra_options : OptionParser -> ) #

[View source]
def extra_options : OptionParser -> Nil? #

[View source]
def extra_options=(extra_options) #

[View source]
def handlers #

[View source]
def handlers=(handlers : Array(HTTP::Handler)) #

[View source]
def host_binding : String #

[View source]
def host_binding=(host_binding) #

[View source]
def logger #

[View source]
def logger=(logger : Kemal::BaseLogHandler) #

[View source]
def logging : Bool #

[View source]
def logging=(logging) #

[View source]
def port : Int32 #

[View source]
def port=(port) #

[View source]
def powered_by_header : Bool #

[View source]
def powered_by_header=(powered_by_header : Bool) #

[View source]
def public_folder : String #

[View source]
def public_folder=(public_folder) #

[View source]
def running : Bool #

[View source]
def running=(running) #

[View source]
def scheme #

[View source]
def serve_static : Bool | Hash(String, Bool) #

[View source]
def serve_static=(serve_static : Bool | Hash(String, Bool)) #

[View source]
def server : HTTP::Server? #

[View source]
def server=(server : HTTP::Server?) #

[View source]
def setup #

[View source]
def shutdown_message : Bool #

[View source]
def shutdown_message=(shutdown_message) #

[View source]
def ssl : OpenSSL::SSL::Context::Server? #

[View source]
def ssl=(ssl) #

[View source]
def static_headers : HTTP::Server::Response, String, File::Info -> Void? #

[View source]
def static_headers=(static_headers : HTTP::Server::Response, String, File::Info -> Void?) #

[View source]