Fix static files router

This commit is contained in:
messense 2017-04-13 12:11:38 +08:00
parent 35b92e1511
commit 4c66cb1854
No known key found for this signature in database
GPG Key ID: BB41A8A2C716CCA9

View File

@ -288,7 +288,7 @@ class Sanic:
attach_to=middleware_or_request)
# Static Files
def static(self, uri, file_or_directory, pattern='.+',
def static(self, uri, file_or_directory, pattern=r'/?.+',
use_modified_since=True, use_content_range=False):
"""Register a root to serve files from. The input can either be a
file or a directory. See