Skip to content

Commit

Permalink
support for new CE_ env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
data-henrik committed Jul 19, 2021
1 parent 3e802a1 commit 4771918
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions backend/ghstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,14 @@
EVENT_TOKEN=os.getenv("EVENT_TOKEN","CE_rulez")

# Full hostname
FULL_HOSTNAME=os.getenv("FULL_HOSTNAME")

# Code Engine started to inject new environment variables. CE_SUBDOMAIN
# is only set for new apps after that change. Old apps continue to set
# FULL_HOSTNAME.
if 'CE_SUBDOMAIN' in os.environ:
FULL_HOSTNAME='https://'+os.getenv("CE_APP")+'.'+os.getenv("CE_SUBDOMAIN")+'.'+os.getenv("CE_DOMAIN")
else:
FULL_HOSTNAME=os.getenv("FULL_HOSTNAME")

# is everything configured?
if (DB2_URI and APPID_CLIENT_ID and APPID_OAUTH_SERVER_URL and APPID_SECRET and FULL_HOSTNAME):
ALL_CONFIGURED=True
Expand Down

0 comments on commit 4771918

Please sign in to comment.