diff --git a/pkg/config.py b/pkg/config.py index a6515a1..69643ca 100644 --- a/pkg/config.py +++ b/pkg/config.py @@ -33,6 +33,8 @@ SSL_VERIFY = os.getenv('INSECURE_SSL_VERIFY', backend_config['insecure_ssl_verify'] if 'insecure_ssl_verify' in backend_config else 'false' ).lower() in ('true', '1', 't') +FRONTEND_PROTOCOL = os.getenv('FRONTEND_PROTOCOL', frontend_config['domain'].split('://')[0] if 'domain' in frontend_config else 'https') + # MongoStore MONGO_URI = os.getenv('MONGO_URI', backend_config['mongo']['uri']) diff --git a/pkg/kube.py b/pkg/kube.py index 12d1f5f..7d5d012 100644 --- a/pkg/kube.py +++ b/pkg/kube.py @@ -106,7 +106,7 @@ def determine_new_endpoints(userapp_id, username, service_key, conditions): 'path': path, # 'port': ':', # unused # 'nodePort': ':', # unused - 'url': '%s://%s%s' % (protocol, host, path), + 'url': '%s://%s%s' % (config.FRONTEND_PROTOCOL, host, path), } logger.debug('Adding endpoint: %s' % endpoint)