Skip to content

Commit

Permalink
fix: use same protocol when forming endpoint links (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
bodom0015 authored Jan 17, 2024
1 parent 909cf85 commit 1b3ef7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
2 changes: 1 addition & 1 deletion pkg/kube.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1b3ef7c

Please sign in to comment.