diff --git a/README.md b/README.md index 91494c4..75c37a7 100644 --- a/README.md +++ b/README.md @@ -65,3 +65,6 @@ sudo yunohost app upgrade calibreweb -u https://github.com/Yunohost-Apps/calibre ## Todo - [ ] Multiinstance - [ ] Better Multimedia integration + +## License +Package and software are GPL 3.0 diff --git a/conf/nginx.conf b/conf/nginx.conf index 89aac79..75e244a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,8 +4,8 @@ location __PATH__ { if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - proxy_pass http://localhost:__PORT__; - proxy_set_header X-Forwarded-For $remote_addr; + proxy_pass http://localhost:__PORT__; + proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Scheme $scheme; diff --git a/scripts/install b/scripts/install index 3931f55..1aefa67 100755 --- a/scripts/install +++ b/scripts/install @@ -97,6 +97,12 @@ pip install --target $final_path/vendor -r $final_path/requirements.txt #================================================= # NGINX CONFIGURATION #================================================= +#Cannot use empty string for X-script-name +if [ $path_url = "/" ] ; then + ynh_replace_string " proxy_set_header X-Script-Name __PATH__;" + " proxy_set_header X-Script-Name /$app;" + ../conf/nginx.conf +fi # Create a dedicated nginx config ynh_add_nginx_config