forked from p15670423/monkey
Now accessing a page by url works
This commit is contained in:
parent
6e1cc8ccf5
commit
1e254b9409
|
@ -25,7 +25,11 @@ __author__ = 'Barak'
|
||||||
def serve_static_file(static_path):
|
def serve_static_file(static_path):
|
||||||
if static_path.startswith('api/'):
|
if static_path.startswith('api/'):
|
||||||
raise NotFound()
|
raise NotFound()
|
||||||
|
try:
|
||||||
return send_from_directory('ui/dist', static_path)
|
return send_from_directory('ui/dist', static_path)
|
||||||
|
except NotFound:
|
||||||
|
# Because react uses various urls for same index page, this is probably the user's intention.
|
||||||
|
serve_home()
|
||||||
|
|
||||||
|
|
||||||
def serve_home():
|
def serve_home():
|
||||||
|
|
Loading…
Reference in New Issue