mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Added more generalized support for static user files, GH-135
This commit is contained in:
parent
02c77a5e31
commit
0c948561a8
@ -182,6 +182,15 @@ def static(path):
|
|||||||
response.set_header("Cache-Control", "public, max-age=3600")
|
response.set_header("Cache-Control", "public, max-age=3600")
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
# static files not supplied by the package
|
||||||
|
@webserver.get("/static_custom/<category>/<path:path>")
|
||||||
|
def static_custom(category,path):
|
||||||
|
rootpath = {
|
||||||
|
'css':data_dir['css']()
|
||||||
|
}
|
||||||
|
response = static_file(path,root=rootpath[category])
|
||||||
|
response.set_header("Cache-Control", "public, max-age=3600")
|
||||||
|
return response
|
||||||
|
|
||||||
|
|
||||||
### DYNAMIC
|
### DYNAMIC
|
||||||
|
Loading…
Reference in New Issue
Block a user