Skip to content
Snippets Groups Projects
Commit 5a18e33b authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Fixed an issue in connecting over SSL from the agent to the webapp API.

parent 60c7cf06
No related branches found
No related tags found
No related merge requests found
...@@ -69,8 +69,9 @@ services: ...@@ -69,8 +69,9 @@ services:
- DJANGO_DEBUG=True - DJANGO_DEBUG=True
- DJANGO_LOG_LEVEL=CRITICAL - DJANGO_LOG_LEVEL=CRITICAL
- ROSETTA_LOG_LEVEL=DEBUG - ROSETTA_LOG_LEVEL=DEBUG
#- ROSETTA_WEBAPP_HOST=localhost # Internal, for the agent #- ROSETTA_WEBAPP_SSL=False # Used for the agent.
#- ROSETTA_WEBAPP_PORT=8080 # Internal, for the agent #- ROSETTA_WEBAPP_HOST= # Used for the agent, can be internal. Defaults to webapp IP.
#- ROSETTA_WEBAPP_PORT=8080 # Used for the agent, can be internal.
#- ROSETTA_REGISTRY_HOST=proxy #- ROSETTA_REGISTRY_HOST=proxy
#- ROSETTA_REGISTRY_PORT=5000 #- ROSETTA_REGISTRY_PORT=5000
#- DJANGO_EMAIL_APIKEY="" #- DJANGO_EMAIL_APIKEY=""
......
...@@ -504,8 +504,12 @@ def get_my_ip(): ...@@ -504,8 +504,12 @@ def get_my_ip():
return my_ip return my_ip
def get_webapp_conn_string(): def get_webapp_conn_string():
webapp_ssl = booleanize(os.environ.get('ROSETTA_WEBAPP_SSL', False))
webapp_host = os.environ.get('ROSETTA_WEBAPP_HOST', get_my_ip()) webapp_host = os.environ.get('ROSETTA_WEBAPP_HOST', get_my_ip())
webapp_port = os.environ.get('ROSETTA_WEBAPP_PORT', '8080') webapp_port = os.environ.get('ROSETTA_WEBAPP_PORT', '8080')
if webapp_ssl:
webapp_conn_string = 'https://{}:{}'.format(webapp_host, webapp_port)
else:
webapp_conn_string = 'http://{}:{}'.format(webapp_host, webapp_port) webapp_conn_string = 'http://{}:{}'.format(webapp_host, webapp_port)
return webapp_conn_string return webapp_conn_string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment