Skip to content

Commit 123b985

Browse files
authored
Update app.py
1 parent 847367c commit 123b985

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/app.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ def sitemap():
5858

5959
# any other endpoint will try to serve it like a static file
6060

61+
@app.route('/admin', methods=['GET'])
62+
def serve_any_other_file(path):
63+
response = send_from_directory(static_file_dir, path)
64+
response.cache_control.max_age = 0 # avoid cache memory
65+
return response
66+
67+
@app.route('/admin/<path:path>', methods=['GET'])
68+
def serve_any_other_file(path):
69+
response = send_from_directory(static_file_dir, path)
70+
response.cache_control.max_age = 0 # avoid cache memory
71+
return response
6172

6273
@app.route('/<path:path>', methods=['GET'])
6374
def serve_any_other_file(path):

0 commit comments

Comments
 (0)