-
-
Save scalp42/fc82207c5cf546e5ea24 to your computer and use it in GitHub Desktop.
Middleware loads twice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Base < Scorched::Controller | |
middleware << proc do | |
use Rack::Session::Cookie, secret: 'mysecretcookie' | |
end | |
map pattern: '/sub', conditions: { method: 'GET' }, target: Sub | |
# If set after the mapping, it won't work for some reason | |
# middleware << proc do | |
# use Rack::Session::Cookie, secret: 'mysecretcookie' | |
# end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Sub < ApiV1 | |
get '/hello' do | |
'world' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment