diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-04-12 16:11:42 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-04-12 17:35:53 -0700 |
commit | b28547df2025afb7b5d8941e5553865ff5dc29a6 (patch) | |
tree | 06656410e6e7f0d99cbf34db5d9cf18ee264238f /python/fatcat_web/web_config.py | |
parent | 42be320518d238d3f26901e17618ff604435a657 (diff) | |
download | fatcat-b28547df2025afb7b5d8941e5553865ff5dc29a6.tar.gz fatcat-b28547df2025afb7b5d8941e5553865ff5dc29a6.zip |
web: consistent public API URLs
Diffstat (limited to 'python/fatcat_web/web_config.py')
-rw-r--r-- | python/fatcat_web/web_config.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/fatcat_web/web_config.py b/python/fatcat_web/web_config.py index 25c93114..3dba933d 100644 --- a/python/fatcat_web/web_config.py +++ b/python/fatcat_web/web_config.py @@ -22,6 +22,10 @@ class Config(object): FATCAT_DOMAIN = os.environ.get("FATCAT_DOMAIN", default="dev.fatcat.wiki") FATCAT_API_AUTH_TOKEN = os.environ.get("FATCAT_API_AUTH_TOKEN", default=None) FATCAT_API_HOST = os.environ.get("FATCAT_API_HOST", default="https://{}/v0".format(FATCAT_DOMAIN)) + public_host_default = f"https://{FATCAT_DOMAIN}/v0" + if FATCAT_DOMAIN == "dev.fatcat.wiki": + public_host_default = FATCAT_API_HOST + FATCAT_PUBLIC_API_HOST = os.environ.get("FATCAT_PUBLIC_API_HOST", default=public_host_default) # can set this to https://search.fatcat.wiki for some experimentation ELASTICSEARCH_BACKEND = os.environ.get("ELASTICSEARCH_BACKEND", default="http://localhost:9200") |