mirror of
https://github.com/searxng/searxng.git
synced 2025-12-22 19:50:00 +00:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user