diff --git a/README.md b/README.md index 2219c3e..c928dd6 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,8 @@ LDAP-Identification is performed using the email. | `EXTERNAL_WEB_DNS` | Custom address for checking availability and passed to `IFRAME_PATH_FORMAT`. Should be set to the external address of the docker host | `nojava-ipmi-kvm.corporate.local` | | `WEB_PORT_START` | The first port to be allocated to kvm containers | `8800` | | `WEB_PORT_END` | The first port outside the range | `8900` | +| `WSPING_INTERVAL` | The interval for websocket ping requests | `5` | +| `WSPING_TIMEOUT` | The timeout for websocket ping/pong replies | `30` | | `JAVA_IFRAME_PATH_FORMAT` | This format specifies the iframe url used for java kvm hosts, useful if you have a reverse proxy | (see section [IFRAME_PATH_FORMAT](#IFRAME_PATH_FORMAT)) | | `HTML5_IFRAME_PATH_FORMAT` | This format specifies the iframe url used for html5 kvm hosts, useful if you have a reverse proxy | (see section [IFRAME_PATH_FORMAT](#IFRAME_PATH_FORMAT)) | | `HTML5_AUTHORIZATION` | Authorization cookie required to access html5 consoles. `generate`: auto-generated, `use_server`: Uses the `is_admin` cookie set by server, `[key]:[value]`: Manual | `kvm_authorization:abcdefgh` | diff --git a/main.py b/main.py index 5c3ea7e..40a3238 100644 --- a/main.py +++ b/main.py @@ -20,6 +20,8 @@ WEBAPP_PORT = int(os.environ["WEBAPP_PORT"]) WEBAPP_BASE = os.environ["WEBAPP_BASE"] CONFIG_PATH = os.environ.get("KVM_CONFIG_PATH", DEFAULT_CONFIG_FILEPATH) +WSPING_INTERVAL = os.environ.get("WSPING_INTERVAL", 5) +WSPING_TIMEOUT = os.environ.get("WSPING_TIMEOUT", 30) logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO")) @@ -67,7 +69,8 @@ def make_app(): "login_url": "/oauth/login", "xsrf_cookies": True, "default_handler_class": MainHandler, - "websocket_ping_interval": 10, + "websocket_ping_interval": WSPING_INTERVAL, + "websocket_ping_timeout": WSPING_TIMEOUT, } return web.Application( [web.url(r"/oauth/login", OAuth2LoginHandler), web.url(r"/", MainHandler), web.url(r"/kvm", KVMHandler)],