From 1b3ef7c0a5e94add6d4e214a29c1d7d3b9343e0e Mon Sep 17 00:00:00 2001 From: Sara Lambert Date: Wed, 17 Jan 2024 15:34:53 -0600 Subject: [PATCH] fix: use same protocol when forming endpoint links (#18) --- pkg/config.py | 2 ++ pkg/kube.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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)