diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-10-22 14:10:41 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-10-22 14:10:41 -0700 |
commit | f931c67c3f0f51f352961db1c37af5998a332792 (patch) | |
tree | 7cfe71a708e6304b55cef1642126cb336ad836ca | |
parent | 3243915d7933d18e50f1ce7135135d4da1756701 (diff) | |
download | fatcat-scholar-f931c67c3f0f51f352961db1c37af5998a332792.tar.gz fatcat-scholar-f931c67c3f0f51f352961db1c37af5998a332792.zip |
make onion-location header configurable
-rw-r--r-- | fatcat_scholar/templates/base.html | 6 | ||||
-rw-r--r-- | settings.toml | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html index 6302f6f..2ae131d 100644 --- a/fatcat_scholar/templates/base.html +++ b/fatcat_scholar/templates/base.html @@ -4,10 +4,8 @@ <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="referrer" content="origin-when-cross-origin"> - {% if settings.SCHOLAR_ENV == "prod" -%} - <meta http-equiv="onion-location" content="https://scholar.archivev3qli37bju4rlh27glh24lljyezwxf4pokmrdbpefjlcrp5id.onion"> - {%- elif settings.SCHOLAR_ENV == "qa" -%} - <meta http-equiv="onion-location" content="https://scholar-qa.archivev3qli37bju4rlh27glh24lljyezwxf4pokmrdbpefjlcrp5id.onion"> + {% if settings.ONION_DOMAIN %} + <meta http-equiv="onion-location" content="//{{ settings.ONION_DOMAIN }}"> {%- endif %} <title> {%- if settings.SCHOLAR_ENV != "prod" -%}[{{ settings.SCHOLAR_ENV|upper }}] {% endif -%} diff --git a/settings.toml b/settings.toml index 657e2dc..f11ed7d 100644 --- a/settings.toml +++ b/settings.toml @@ -17,6 +17,7 @@ SENTRY_DSN = "" ENABLE_GOATCOUNTER = 0 GOATCOUNTER_ENDPOINT = "https://goatcounter.scholar.fatcat.wiki/count" GOATCOUNTER_SCRIPT_URL = "https://goatcounter.scholar.fatcat.wiki/count.js" +ONION_DOMAIN = "scholar-qa.archivev3qli37bju4rlh27glh24lljyezwxf4pokmrdbpefjlcrp5id.onion" [test] SCHOLAR_ENV = "test" |