Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Commit

Permalink
k8s env will only have a hostname not a full URL
Browse files Browse the repository at this point in the history
  • Loading branch information
binocarlos committed Mar 6, 2016
1 parent 732ce7c commit 4858efa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions authentication/authentication.py
Expand Up @@ -72,10 +72,11 @@ def get_id(self):
app.config['JSONSCHEMA_DIR'] = os.path.join(app.root_path, 'schemas')
jsonschema = JsonSchema(app)

STORAGE_URL = os.environ.get('STORAGE_URL', 'http://storage:5001')
STORAGE_HOST = os.environ.get('STORAGE_HOST', 'storage')
if STORAGE_HOST.find('env:')==0:
STORAGE_HOST = os.environ.get(STORAGE_HOST.split(':')[1])

if STORAGE_URL.find('env:')==0:
STORAGE_URL = os.environ.get(STORAGE_URL.split(':')[1])
STORAGE_URL = os.environ.get('STORAGE_URL', 'http://' + STORAGE_HOST + ':5001')

@login_manager.user_loader
def load_user_from_id(user_id):
Expand Down

0 comments on commit 4858efa

Please sign in to comment.