Move static file handler to be called after the instance handler
This way only routes that are not caught by the instance handler will go through to the static file handler.
This commit is contained in:
parent
5c4eaa99e2
commit
8cf04b58ca
|
@ -1,4 +1,4 @@
|
|||
require "spec_helper"
|
||||
require "./spec_helper"
|
||||
|
||||
describe "Frank::Handler" do
|
||||
it "routes" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "spec_helper"
|
||||
require "./spec_helper"
|
||||
|
||||
describe "Route" do
|
||||
describe "match" do
|
||||
|
|
|
@ -11,8 +11,8 @@ at_exit do
|
|||
config = Frank.config
|
||||
handlers = [] of HTTP::Handler
|
||||
handlers << HTTP::LogHandler.new
|
||||
handlers << HTTP::StaticFileHandler.new("./public")
|
||||
handlers << Frank::Handler::INSTANCE
|
||||
handlers << HTTP::StaticFileHandler.new("./public")
|
||||
server = HTTP::Server.new(config.port, handlers)
|
||||
|
||||
server.ssl = config.ssl
|
||||
|
|
Loading…
Reference in New Issue