1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-22 12:10:11 +01:00

misc: fix variuous marginals

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2020-04-04 17:53:16 +02:00
parent 3c19f2f1ce
commit e530e20ae6
5 changed files with 13 additions and 12 deletions

View File

@ -16,7 +16,10 @@
# The default is taken from ./utils/brand.env. # The default is taken from ./utils/brand.env.
PUBLIC_URL="${SEARX_URL}" PUBLIC_URL="${SEARX_URL}"
#PUBLIC_URL="http://$(uname -n)/searx"
if [[ ${PUBLIC_URL} == "https://searx.me" ]]; then
PUBLIC_URL=
fi
# searx.sh # searx.sh
# --------- # ---------

View File

@ -449,14 +449,14 @@ install_template() {
break break
;; ;;
"interactiv shell") "interactiv shell")
echo "// edit ${dst} to your needs" echo -e "// edit ${_Red}${dst}${_creset} to your needs"
echo -e "// exit with [${_BCyan}CTRL-D${_creset}]" echo -e "// exit with [${_BCyan}CTRL-D${_creset}]"
sudo -H -u "${owner}" -i sudo -H -u "${owner}" -i
$DIFF_CMD "${dst}" "${template_file}" $DIFF_CMD "${dst}" "${template_file}"
echo echo
echo "${_BBlack}did you edit file ...${_creset}" echo -e "// ${_BBlack}did you edit file ...${_creset}"
printf " ${template_file}" echo -en "// ${_Red}${dst}${_creset}"
if ask_yn "... to your needs?"; then if ask_yn "//${_BBlack}... to your needs?${_creset}"; then
break break
fi fi
;; ;;

View File

@ -15,6 +15,7 @@ in_container && lxc_set_suite_env
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
PUBLIC_URL="${PUBLIC_URL:-http://$(uname -n)/searx}" PUBLIC_URL="${PUBLIC_URL:-http://$(uname -n)/searx}"
PUBLIC_HOST="${PUBLIC_HOST:-$(echo "$PUBLIC_URL" | sed -e 's/[^/]*\/\/\([^@]*@\)\?\([^:/]*\).*/\2/')}"
PUBLIC_URL_PATH_MORTY="${PUBLIC_URL_PATH_MORTY:-/morty}" PUBLIC_URL_PATH_MORTY="${PUBLIC_URL_PATH_MORTY:-/morty}"
PUBLIC_URL_MORTY="$(echo "$PUBLIC_URL" | sed -e's,^\(.*://[^/]*\).*,\1,g')${PUBLIC_URL_PATH_MORTY}" PUBLIC_URL_MORTY="$(echo "$PUBLIC_URL" | sed -e's,^\(.*://[^/]*\).*,\1,g')${PUBLIC_URL_PATH_MORTY}"
@ -378,7 +379,6 @@ EOF
return 0 return 0
} }
enable_debug() { enable_debug() {
warn_msg "Do not enable debug in production enviroments!!" warn_msg "Do not enable debug in production enviroments!!"
info_msg "Enabling debug option needs to reinstall systemd service!" info_msg "Enabling debug option needs to reinstall systemd service!"

View File

@ -19,9 +19,7 @@ ProxyPreserveHost On
RequestHeader set X-Script-Name ${PUBLIC_URL_PATH_MORTY} RequestHeader set X-Script-Name ${PUBLIC_URL_PATH_MORTY}
# In Apache it seems, that setting HTTP_HOST header direct here does have no # In Apache it seems, that setting HTTP_HOST header direct here does have no
# effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST is # effect. I needed to set 'ProxyPreserveHost On' (see above).
# needed by searx to render correct *Search URL* in the *Link* box and
# *saved preference*.
# RequestHeader set Host ${PUBLIC_HOST} # RequestHeader set Host ${PUBLIC_HOST}

View File

@ -24,9 +24,9 @@ ProxyPreserveHost On
RequestHeader set X-Script-Name ${FILTRON_URL_PATH} RequestHeader set X-Script-Name ${FILTRON_URL_PATH}
# In Apache it seems, that setting HTTP_HOST header direct here does have no # In Apache it seems, that setting HTTP_HOST header direct here does have no
# effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST is # effect. I needed to set 'ProxyPreserveHost On' (see above). HTTP_HOST
# needed by searx to render correct *Search URL* in the *Link* box and # (ProxyPreserveHost On) is needed by searx to render correct *Search URL*
# *saved preference*. # in the *Link* box and *saved preference*.
# RequestHeader set Host ${PUBLIC_HOST} # RequestHeader set Host ${PUBLIC_HOST}