Began to add global toolbar
This commit is contained in:
@@ -38,6 +38,8 @@ def guess_mimetype(filename):
|
||||
mimetype = 'text/css'
|
||||
elif filename.endswith('.ico'):
|
||||
mimetype = 'image/x-icon'
|
||||
elif filename.endswith(".png"):
|
||||
mimetype = "image/png"
|
||||
else:
|
||||
mimetype = 'text/html'
|
||||
return mimetype
|
||||
@@ -147,11 +149,16 @@ def subdir_test_file(file):
|
||||
resp = flask.send_file("client/test/"+file, mimetype=guess_mimetype(file))
|
||||
return resp
|
||||
|
||||
@app.route('/components/control/<file>')
|
||||
@app.route('/components/divider/<file>')
|
||||
@app.route('/components/states_indicator/dates/<file>')
|
||||
@app.route('/components/states_indicator/live/<file>')
|
||||
@app.route('/res/<file>')
|
||||
@app.route('/jsFiles/<file>')
|
||||
@app.route('/cssFiles/<file>')
|
||||
@app.route('/externalFiles/<file>')
|
||||
def subdir_file(file):
|
||||
subdir = flask.request.path.split('/')[1]
|
||||
subdir = "/".join(flask.request.path.split("/")[1:-1])
|
||||
resp = flask.send_file("client/" + subdir+"/"+file, mimetype=guess_mimetype(file))
|
||||
#resp.headers['Content-Security-Policy'] = "sandbox; script-src 'unsafe-inline';"
|
||||
return resp
|
||||
|
||||
Reference in New Issue
Block a user