diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2020-04-28 16:21:45 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2020-04-28 16:21:45 +0200 |
commit | ea3255835a259516c7a8b62eb319a338cebf7e9f (patch) | |
tree | 55cd99af01fd79317b6d118a0584b2e5d0e7b544 /utils/morty.sh | |
parent | 26a3a7d52359075bb96b39b26ed60430f2c667b9 (diff) | |
download | searxng-ea3255835a259516c7a8b62eb319a338cebf7e9f.tar.gz searxng-ea3255835a259516c7a8b62eb319a338cebf7e9f.zip |
utils/morty.sh: set morty key to avoid service abuse
- https://github.com/asciimoo/searx/issues/1871#issuecomment-592459798
make install all
generates random MORTY_KEY, install service with that key and sets option in the
searx settingy.yml file.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/morty.sh')
-rwxr-xr-x | utils/morty.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/morty.sh b/utils/morty.sh index 851b8864d..6b90db581 100755 --- a/utils/morty.sh +++ b/utils/morty.sh @@ -208,6 +208,9 @@ main() { } install_all() { + + MORTY_KEY="$(head -c 32 /dev/urandom | base64)" + rst_title "Install $SERVICE_NAME (service)" assert_user wait_key @@ -233,7 +236,7 @@ install_all() { fi info_searx if ask_yn "Add image and result proxy to searx settings.yml?" Yn; then - "${REPO_ROOT}/utils/searx.sh" option result-proxy "${PUBLIC_URL_MORTY}" + "${REPO_ROOT}/utils/searx.sh" option result-proxy "${PUBLIC_URL_MORTY}" "${MORTY_KEY}" "${REPO_ROOT}/utils/searx.sh" option image-proxy-on fi |