mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Support /static/ files serving, Ref: #1362
This commit is contained in:
1 parent
96d5e351f7
commit
867e997b74
10 files changed
+151
-4
No files matched your search
@@ -117,6 +117,9 @@ class Response(aiohttp.web.Response):
|
||||
"""
|
||||
Return a file as a response
|
||||
"""
|
||||
if not os.path.exists(path):
|
||||
raise aiohttp.web.HTTPNotFound()
|
||||
|
||||
ct, encoding = mimetypes.guess_type(path)
|
||||
if not ct:
|
||||
ct = 'application/octet-stream'
|
||||
|
||||
Reference in new issue
Block a user