diff --git a/README.md b/README.md index 1de497d..83695db 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ In addition to constituting an advantage in terms of confidentiality (the data d - Ability to subscribe to channels without creating a Google account -**Shipped version:** 22.01.12~ynh1 +**Shipped version:** 22.01.14~ynh1 **Demo:** https://invidious.site/ diff --git a/README_fr.md b/README_fr.md index 932e0d4..ffbfcd0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ En plus de constituer un avantage sur le plan de la confidentialité (les donné - Possibilité d'afficher les commentaires Reddit plutôt que les commentaires YouTube, - Possibilité de s'abonner aux chaines sans créer de compte Google -**Version incluse :** 22.01.12~ynh1 +**Version incluse :** 22.01.14~ynh1 **Démo :** https://invidious.site/ diff --git a/conf/config.yml b/conf/config.yml index 7a4191b..7d29058 100644 --- a/conf/config.yml +++ b/conf/config.yml @@ -252,7 +252,7 @@ hsts: true ## Accepted values: true, false ## Default: true ## -#registration_enabled: true +registration_enabled: __REGISTRATION_ENABLED__ ## ## Allow/Forbid users to log-in. This setting affects the ability @@ -261,7 +261,7 @@ hsts: true ## Accepted values: true, false ## Default: true ## -#login_enabled: true +login_enabled: __LOGIN_ENABLED__ ## ## Enable/Disable the captcha challenge on the login page. @@ -272,7 +272,7 @@ hsts: true ## Accepted values: true, false ## Default: true ## -#captcha_enabled: true +captcha_enabled: __CAPTCHA_ENABLED__ ## ## List of usernames that will be granted administrator rights. diff --git a/conf/nginx.conf b/conf/nginx.conf index 346adf0..089fcff 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -17,10 +17,6 @@ location __PATH__/ { } location __PATH__/embed/ { - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } proxy_pass http://127.0.0.1:__PORT__/embed/; proxy_redirect off; diff --git a/config_panel.toml b/config_panel.toml new file mode 100644 index 0000000..14e71f1 --- /dev/null +++ b/config_panel.toml @@ -0,0 +1,32 @@ +version = "1.0" + +[main] +name = "Invidious configuration" +services = ["__APP__"] + + [main.config] + name = "Configuration Options" + + [main.config.registration_enabled] + ask = "Enable registration" + type = "boolean" + yes = "true" + no = "false" + help = "Allow/Forbid Invidious (local) account creation" + bind = "registration_enabled:__FINALPATH__/config/config.yml" + + [main.config.login_enabled] + ask = "Enable login" + type = "boolean" + yes = "true" + no = "false" + help = "Allow/Forbid users to log-in" + bind = "login_enabled:__FINALPATH__/config/config.yml" + + [main.config.captcha_enabled] + ask = "Enable captcha" + type = "boolean" + yes = "true" + no = "false" + help = "Enable/Disable the captcha challenge on the login page" + bind = "captcha_enabled:__FINALPATH__/config/config.yml" \ No newline at end of file diff --git a/manifest.json b/manifest.json index 1de3257..cdae8d0 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Alternative front-end to YouTube", "fr": "Front-end alternatif à YouTube" }, - "version": "22.01.12~ynh1", + "version": "22.01.14~ynh1", "url": "https://invidio.us/", "upstream": { "license": "GPL-3.0-only", diff --git a/scripts/_common.sh b/scripts/_common.sh index 7853fa5..b6ff7ea 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -version_commit=b65dced646acf56f914a8916fd411237a141ecce +version_commit=8b0ed8b110752327b98565e4ecc4faf437c0bb3b # dependencies used by the app pkg_dependencies="apt-transport-https libssl-dev libxml2-dev libyaml-dev libgmp-dev libreadline-dev postgresql librsvg2-bin imagemagick libsqlite3-dev zlib1g-dev libevent-dev pkg-config libpcre3-dev" diff --git a/scripts/install b/scripts/install index f03e6f1..27c6ddb 100644 --- a/scripts/install +++ b/scripts/install @@ -30,6 +30,10 @@ language=$YNH_APP_ARG_LANGUAGE app=$YNH_APP_INSTANCE_NAME +registration_enabled="true" +login_enabled="true" +captcha_enabled="true" + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -49,6 +53,9 @@ ynh_script_progression --message="Storing installation settings..." --weight=2 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=language --value=$language +ynh_app_setting_set --app=$app --key=registration_enabled --value=$registration_enabled +ynh_app_setting_set --app=$app --key=login_enabled --value=$login_enabled +ynh_app_setting_set --app=$app --key=captcha_enabled --value=$captcha_enabled #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index 996076f..46f2b30 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,10 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) +registration_enabled=$(ynh_app_setting_get --app=$app --key=registration_enabled) +login_enabled=$(ynh_app_setting_get --app=$app --key=login_enabled) +captcha_enabled=$(ynh_app_setting_get --app=$app --key=captcha_enabled) + #================================================= # CHECK VERSION #================================================= @@ -59,6 +63,21 @@ ynh_systemd_action --service_name=$app --action=stop --log_path=systemd #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +if [ -z "$registration_enabled" ]; then + registration_enabled="true" + ynh_app_setting_set --app=$app --key=registration_enabled --value=$registration_enabled +fi + +if [ -z "$login_enabled" ]; then + login_enabled="true" + ynh_app_setting_set --app=$app --key=login_enabled --value=$login_enabled +fi + +if [ -z "$captcha_enabled" ]; then + captcha_enabled="true" + ynh_app_setting_set --app=$app --key=captcha_enabled --value=$captcha_enabled +fi + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all