diff --git a/README.md b/README.md index 74b0344..9c46fee 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to - As well any documents or images uploaded by users will be backed up -**Shipped version:** 0.3.2~ynh1 +**Shipped version:** 0.3.2~ynh2 **Demo:** diff --git a/README_es.md b/README_es.md index 051a90a..48c03d2 100644 --- a/README_es.md +++ b/README_es.md @@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to - As well any documents or images uploaded by users will be backed up -**Versión actual:** 0.3.2~ynh1 +**Versión actual:** 0.3.2~ynh2 **Demo:** diff --git a/README_eu.md b/README_eu.md index 7be3c27..6d98f23 100644 --- a/README_eu.md +++ b/README_eu.md @@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to - As well any documents or images uploaded by users will be backed up -**Paketatutako bertsioa:** 0.3.2~ynh1 +**Paketatutako bertsioa:** 0.3.2~ynh2 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 2bad82a..52b753a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to - As well any documents or images uploaded by users will be backed up -**Version incluse :** 0.3.2~ynh1 +**Version incluse :** 0.3.2~ynh2 **Démo :** diff --git a/README_gl.md b/README_gl.md index 2f94fb5..1ed1121 100644 --- a/README_gl.md +++ b/README_gl.md @@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to - As well any documents or images uploaded by users will be backed up -**Versión proporcionada:** 0.3.2~ynh1 +**Versión proporcionada:** 0.3.2~ynh2 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index d7ec0bd..b28fcd7 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -32,7 +32,7 @@ This Yunohost app installs the server part (services + mongo database) needed to - As well any documents or images uploaded by users will be backed up -**分发版本:** 0.3.2~ynh1 +**分发版本:** 0.3.2~ynh2 **演示:** diff --git a/conf/nginx.conf b/conf/nginx.conf index f3fb881..c0cc56e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -8,6 +8,7 @@ location __PATH__/ { # Handling preflight requests if ($request_method = OPTIONS) { more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *'; + return 200; } # Path to source @@ -37,6 +38,10 @@ location __PATH__/ { } location __PATH__/project { + if ($request_method = OPTIONS) { + more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *'; + return 200; + } proxy_pass http://localhost:__PORT_PROJECT__/project; proxy_set_header Host $host; proxy_read_timeout 86400s; @@ -44,6 +49,10 @@ location __PATH__/ { } location __PATH__/data { + if ($request_method = OPTIONS) { + more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *'; + return 200; + } proxy_pass http://localhost:__PORT_DATA__/data; proxy_set_header Host $host; proxy_read_timeout 86400s; @@ -51,6 +60,10 @@ location __PATH__/ { } location __PATH__/documents { + if ($request_method = OPTIONS) { + more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *'; + return 200; + } proxy_pass http://localhost:__PORT_DATA__/documents; proxy_set_header Host $host; proxy_read_timeout 86400s; diff --git a/manifest.toml b/manifest.toml index fb36486..84e7fe1 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Dont-code Services" description.en = "Install services and databases needed to support Dont-code platform" description.fr = "Installe les services et base de données nécessaires pour utiliser la plateforme Dont-code" -version = "0.3.2~ynh1" +version = "0.3.2~ynh2" maintainers = ["Dont-code Team"] @@ -20,7 +20,7 @@ userdoc = "https://dont-code.net/news.html" code = "https://github.com/dont-code" [integration] -yunohost = ">= 11.0.0" +yunohost = ">= 11.1.9" architectures = "all" multi_instance = true ldap = false diff --git a/scripts/ynh_mongo_db__2 b/scripts/ynh_mongo_db__2 index 3005e88..5b13477 100644 --- a/scripts/ynh_mongo_db__2 +++ b/scripts/ynh_mongo_db__2 @@ -314,6 +314,7 @@ ynh_install_mongo() { ynh_print_info --message="Installing MongoDB Community Edition ..." local mongo_debian_release=$(ynh_get_debian_release) + local mongo_packages="mongodb-org" if [[ $(cat /proc/cpuinfo) != *"avx"* && "$mongo_version" != "4.4" ]]; then #Sadly mongo 4.4 is the only version not requiring avx instruction set, so we will install it @@ -321,7 +322,13 @@ ynh_install_mongo() { mongo_version="4.4" fi - ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" --package="mongodb-org" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" + if [[ "$mongo_version" == "4.4" ]]; then + ynh_print_warn --message="Switching to buster package install for Mongo 4.4." + mongo_debian_release=buster + mongo_packages="mongodb-org-server mongodb-database-tools mongodb-mongosh-shared-openssl11" + fi + + ynh_install_extra_app_dependencies --repo="deb http://repo.mongodb.org/apt/debian $mongo_debian_release/mongodb-org/$mongo_version main" --package="$mongo_packages" --key="https://www.mongodb.org/static/pgp/server-$mongo_version.asc" mongodb_servicename=mongod # Make sure MongoDB is started and enabled