Making sure StaticFileHandlers get first, if not, a catch all handler would break the static handlers.
This commit is contained in:
parent
3e9a285af0
commit
ae1ed23421
|
@ -909,12 +909,12 @@ class Application(object):
|
|||
handlers = list(handlers or [])
|
||||
static_url_prefix = settings.get("static_url_prefix",
|
||||
"/static/")
|
||||
handlers.extend([
|
||||
handlers = [
|
||||
(re.escape(static_url_prefix) + r"(.*)", StaticFileHandler,
|
||||
dict(path=path)),
|
||||
(r"/(favicon\.ico)", StaticFileHandler, dict(path=path)),
|
||||
(r"/(robots\.txt)", StaticFileHandler, dict(path=path)),
|
||||
])
|
||||
] + handlers
|
||||
if handlers: self.add_handlers(".*$", handlers)
|
||||
|
||||
# Automatically reload modified modules
|
||||
|
|
Loading…
Reference in New Issue