pull/177/merge
muurk 2023-05-05 14:12:36 -07:00 committed by GitHub
commit 67107a8918
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

1
.gitignore vendored
View File

@ -63,3 +63,4 @@ target/
# known_hosts file # known_hosts file
known_hosts known_hosts
venv/

View File

@ -66,6 +66,12 @@ wssh --logging=debug
# log to file # log to file
wssh --log-file-prefix=main.log wssh --log-file-prefix=main.log
# specify alternative location for template material
wssh --template_path=/templates
# specify alternative location for static material
wssh --static_path=/static
# more options # more options
wssh --help wssh --help
``` ```

View File

@ -54,9 +54,12 @@ Example: --encoding='utf-8' to solve the problem with some switches&routers''')
define('version', type=bool, help='Show version information', define('version', type=bool, help='Show version information',
callback=print_version) callback=print_version)
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
font_dirs = ['webssh', 'static', 'css', 'fonts'] font_dirs = ['webssh', 'static', 'css', 'fonts']
define('template_path', default=os.path.join(base_dir, 'webssh', 'templates'))
define('static_path', default=os.path.join(base_dir, 'webssh', 'static'))
max_body_size = 1 * 1024 * 1024 max_body_size = 1 * 1024 * 1024
@ -75,8 +78,8 @@ class Font(object):
def get_app_settings(options): def get_app_settings(options):
settings = dict( settings = dict(
template_path=os.path.join(base_dir, 'webssh', 'templates'), template_path=options.template_path,
static_path=os.path.join(base_dir, 'webssh', 'static'), static_path=options.static_path,
websocket_ping_interval=options.wpintvl, websocket_ping_interval=options.wpintvl,
debug=options.debug, debug=options.debug,
xsrf_cookies=options.xsrf, xsrf_cookies=options.xsrf,