1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/calibreweb_ynh.git synced 2024-09-03 18:16:20 +02:00

Fix X-Script-Name & X-Remote-User

This commit is contained in:
Krakinou 2023-08-05 18:47:52 +02:00
parent 96d54565e0
commit f49b71de87

View file

@ -31,6 +31,19 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
#Cannot use empty string for X-script-name, causes an issue in the python prg #Cannot use empty string for X-script-name, causes an issue in the python prg
if [ $path_url = "/" ] ; then if [ $path_url = "/" ] ; then
ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf ynh_replace_string " proxy_set_header X-Script-Name" "# proxy_set_header X-Script-Name" ../conf/nginx.conf
else
ynh_replace_string "# proxy_set_header X-Script-Name" " proxy_set_header X-Script-Name" ../conf/nginx.conf
fi
if $(ynh_permission_has_user --permission=main --user=visitors); then
ynh_replace_string --match_string=" proxy_set_header X-Remote-User" \
--replace_string="# proxy_set_header X-Remote-User" \
--target_file="../conf/nginx.conf"
else
ynh_replace_string --match_string="# proxy_set_header X-Remote-User" \
--replace_string=" proxy_set_header X-Remote-User" \
--target_file="../conf/nginx.conf"
fi fi
ynh_change_url_nginx_config ynh_change_url_nginx_config