You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
821 B

2 months ago
from flask import send_from_directory, send_file, redirect, jsonify, make_response
from webApp import webApp
from config import config
import os
@webApp.route('/css/<path:path>')
def send_css(path):
resp = make_response(send_from_directory(os.path.join(config['WEB_APP']['template_folder'], 'static/css'), path), 200)
resp.headers['Cache-Control'] = 'public, max-age=31536000'
return resp
@webApp.route('/js/<path:path>')
def send_js(path):
resp = make_response(send_from_directory(os.path.join(config['WEB_APP']['template_folder'], 'static/js'), path), 200)
resp.headers['Cache-Control'] = 'public, max-age=31536000'
2 months ago
return resp
@webApp.route('/pic/<path:path>')
def send_pic(path):
return send_from_directory(os.path.join(config['WEB_APP']['template_folder'], 'static/pics'), path), 200