better
This commit is contained in:
parent
32feae4601
commit
0e02343da9
@ -15,22 +15,8 @@ import sys
|
|||||||
sys.setrecursionlimit(10**6) # this should prevents bots from stopping
|
sys.setrecursionlimit(10**6) # this should prevents bots from stopping
|
||||||
|
|
||||||
sio = socketio.Server(cors_allowed_origins="*")
|
sio = socketio.Server(cors_allowed_origins="*")
|
||||||
if "UseRobots" in os.environ and os.environ['UseRobots'].upper() == "TRUE":
|
|
||||||
static_files={
|
static_files={
|
||||||
'/': {'content_type': 'text/html', 'filename': 'index.html'},
|
|
||||||
'/game': {'content_type': 'text/html', 'filename': 'index.html'},
|
|
||||||
'/help': {'content_type': 'text/html', 'filename': 'index.html'},
|
|
||||||
'/status': {'content_type': 'text/html', 'filename': 'index.html'},
|
|
||||||
'/robots.txt': {'content_type': 'text/html', 'filename': 'robots.txt'},
|
|
||||||
'/favicon.ico': {'filename': 'favicon.ico'},
|
|
||||||
'/img/icons': './img/icons',
|
|
||||||
'/manifest.json': {'filename': 'manifest.json'},
|
|
||||||
'/css': './css',
|
|
||||||
'/media': './media',
|
|
||||||
'/js': './js',
|
|
||||||
}
|
|
||||||
else:
|
|
||||||
static_files={
|
|
||||||
'/': {'content_type': 'text/html', 'filename': 'index.html'},
|
'/': {'content_type': 'text/html', 'filename': 'index.html'},
|
||||||
'/game': {'content_type': 'text/html', 'filename': 'index.html'},
|
'/game': {'content_type': 'text/html', 'filename': 'index.html'},
|
||||||
'/help': {'content_type': 'text/html', 'filename': 'index.html'},
|
'/help': {'content_type': 'text/html', 'filename': 'index.html'},
|
||||||
@ -43,6 +29,8 @@ else:
|
|||||||
'/media': './media',
|
'/media': './media',
|
||||||
'/js': './js',
|
'/js': './js',
|
||||||
}
|
}
|
||||||
|
if "UseRobots" in os.environ and os.environ['UseRobots'].upper() == "TRUE":
|
||||||
|
static_files['/robots.txt'] = {'content_type': 'text/html', 'filename': 'robots.txt'}
|
||||||
|
|
||||||
for file in [f for f in os.listdir('.') if '.js' in f or '.map' in f or '.html' in f]:
|
for file in [f for f in os.listdir('.') if '.js' in f or '.map' in f or '.html' in f]:
|
||||||
static_files[f'/{file}'] = f'./{file}'
|
static_files[f'/{file}'] = f'./{file}'
|
||||||
|
Loading…
Reference in New Issue
Block a user