mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Dynamically insert handlers. Fixes #376
This commit is contained in:
parent
dbbe05a610
commit
1d056b203b
7 changed files with 73 additions and 20 deletions
|
@ -64,6 +64,7 @@ def call_request_on_app(request)
|
|||
end
|
||||
|
||||
def build_main_handler
|
||||
Kemal.config.setup
|
||||
main_handler = Kemal.config.handlers.first
|
||||
current_handler = main_handler
|
||||
Kemal.config.handlers.each_with_index do |handler, index|
|
||||
|
@ -76,7 +77,6 @@ end
|
|||
Spec.before_each do
|
||||
config = Kemal.config
|
||||
config.env = "development"
|
||||
config.setup
|
||||
end
|
||||
|
||||
Spec.after_each do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue