Skip to content

Commit

Permalink
Infer protocol from port if defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Doig committed May 17, 2019
1 parent 88a06bc commit 8c8e3ad
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,13 @@ def _geonode_public_port():
def _geonode_public_protocol():
gn_pub_protocol = os.getenv('GEONODE_LB_PROTOCOL', '')
if not gn_pub_protocol:
gn_pub_protocol = 'http'
gn_pub_port = _geonode_public_port()
if gn_pub_port == 80:
gn_pub_protocol = 'http'
elif gn_pub_port == 443:
gn_pub_protocol = 'https'
else:
gn_pub_protocol = 'http'
return gn_pub_protocol


Expand Down

0 comments on commit 8c8e3ad

Please sign in to comment.