mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Remove unused stuff
This commit is contained in:
parent
536108c71b
commit
6fbad555d0
8 changed files with 6 additions and 4 deletions
|
@ -60,9 +60,11 @@ module Kemal
|
|||
end
|
||||
|
||||
config.server ||= HTTP::Server.new(config.host_binding, config.port, config.handlers)
|
||||
|
||||
{% if !flag?(:without_openssl) %}
|
||||
config.server.not_nil!.tls = config.ssl
|
||||
{% end %}
|
||||
|
||||
config.running = true
|
||||
|
||||
yield config
|
||||
|
|
|
@ -18,7 +18,6 @@ module Kemal
|
|||
@ssl : OpenSSL::SSL::Context::Server?
|
||||
{% end %}
|
||||
|
||||
getter custom_handler_position
|
||||
property host_binding, ssl, port, env, public_folder, logging, running
|
||||
property always_rescue, server : HTTP::Server?, extra_options, shutdown_message
|
||||
property serve_static : (Bool | Hash(String, Bool))
|
||||
|
|
|
@ -13,7 +13,6 @@ class HTTP::Request
|
|||
|
||||
# Checks if method contained in _method param is valid one
|
||||
def self.override_method_valid?(override_method : String)
|
||||
return false unless override_method.is_a?(String)
|
||||
override_method = override_method.upcase
|
||||
override_method == "PUT" || override_method == "PATCH" || override_method == "DELETE"
|
||||
end
|
||||
|
|
|
@ -5,6 +5,7 @@ module Kemal
|
|||
# These methods are useful for the conditional execution of custom handlers .
|
||||
class Handler
|
||||
include HTTP::Handler
|
||||
|
||||
@@only_routes_tree = Radix::Tree(String).new
|
||||
@@exclude_routes_tree = Radix::Tree(String).new
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ module Kemal
|
|||
# *Content-Type* or *X-Powered-By* headers.
|
||||
class InitHandler
|
||||
include HTTP::Handler
|
||||
|
||||
INSTANCE = new
|
||||
|
||||
def call(context : HTTP::Server::Context)
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
module Kemal
|
||||
# Uses `STDOUT` by default and handles the logging of request/response process time.
|
||||
class LogHandler < Kemal::BaseLogHandler
|
||||
@io : IO
|
||||
|
||||
def initialize(@io : IO = STDOUT)
|
||||
end
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ require "radix"
|
|||
module Kemal
|
||||
class RouteHandler
|
||||
include HTTP::Handler
|
||||
|
||||
INSTANCE = new
|
||||
property routes
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
module Kemal
|
||||
class WebSocketHandler
|
||||
include HTTP::Handler
|
||||
|
||||
INSTANCE = new
|
||||
property routes
|
||||
|
||||
|
|
Loading…
Reference in a new issue