Merge branch 'hotfix/v1.1.2' of github.com:ONLYOFFICE/DocSpace into hotfix/v1.1.2

This commit is contained in:
Maksim Chegulov 2023-09-01 16:01:11 +03:00
commit 41431c27b1
5 changed files with 29 additions and 32 deletions

View File

@ -31,6 +31,7 @@ if [ "$UPDATE" = "true" ] && [ "$DOCUMENT_SERVER_INSTALLED" = "true" ]; then
RECONFIGURE_PRODUCT="true"
else
systemctl is-active openresty | grep -q "^active" && systemctl stop openresty
apt-get install -y --only-upgrade ${ds_pkg_name};
fi
fi
@ -61,6 +62,8 @@ if [ "$DOCUMENT_SERVER_INSTALLED" = "false" ]; then
echo ${package_sysname}-documentserver $DS_COMMON_NAME/jwt-secret select ${DS_JWT_SECRET} | sudo debconf-set-selections
echo ${package_sysname}-documentserver $DS_COMMON_NAME/jwt-header select ${DS_JWT_HEADER} | sudo debconf-set-selections
systemctl is-active openresty | grep -q "^active" && systemctl stop openresty
if [ "$INSTALLATION_TYPE" = "COMMUNITY" ]; then
apt-get install -yq ${package_sysname}-documentserver
else

View File

@ -105,10 +105,7 @@ echo "deb [signed-by=/usr/share/keyrings/openresty.gpg] http://openresty.org/pac
chmod 644 /usr/share/keyrings/openresty.gpg
#Temporary fix for missing openresty repository for debian bookworm
[ "$DISTRIB_CODENAME" = "bookworm" ] && sed -i "s/$DISTRIB_CODENAME/bullseye/g" /etc/apt/sources.list.d/openresty.list
if systemctl is-active nginx | grep -q "active"; then
systemctl disable nginx && systemctl stop nginx
fi
systemctl is-active nginx | grep -q "^active" && systemctl stop nginx
# setup msttcorefonts
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections

View File

@ -62,7 +62,7 @@ if [ "${MYSQL_FIRST_TIME_INSTALL}" = "true" ]; then
MYSQL="mysql --connect-expired-password -u$MYSQL_SERVER_USER -D mysql";
else
MYSQL="mysql --connect-expired-password -u$MYSQL_SERVER_USER -p${MYSQL_TEMPORARY_ROOT_PASS} -D mysql";
MYSQL_ROOT_PASS=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 12);
MYSQL_ROOT_PASS=$(echo $MYSQL_TEMPORARY_ROOT_PASS | sed -e 's/;/%/g' -e 's/=/%/g');
fi
MYSQL_AUTHENTICATION_PLUGIN=$($MYSQL -e "SHOW VARIABLES LIKE 'default_authentication_plugin';" -s | awk '{print $2}')

View File

@ -94,10 +94,7 @@ END
rpm --import https://openresty.org/package/pubkey.gpg
OPENRESTY_REPO_FILE=$( [[ "$REV" -ge 9 ]] && echo "openresty2.repo" || echo "openresty.repo" )
curl -o /etc/yum.repos.d/openresty.repo "https://openresty.org/package/centos/${OPENRESTY_REPO_FILE}"
if systemctl is-active nginx | grep -q "active"; then
systemctl disable nginx && systemctl stop nginx
fi
systemctl is-active nginx | grep -q "^active" && systemctl stop nginx
${package_manager} -y install epel-release \
python3 \

View File

@ -90,29 +90,7 @@ server {
proxy_set_header Connection $proxy_connection;
proxy_set_header Proxy "";
location ~* ^/ds-vpath/ {
rewrite /ds-vpath/(.*) /$1 break;
proxy_pass http://172.18.0.4:80;
proxy_redirect off;
client_max_body_size 100m;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $proxy_x_forwarded_host/ds-vpath;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
location / {
set $csp "";
set $csp "";
access_by_lua '
if ngx.req.get_method() == "GET" then
local key = string.format("csp:%s",ngx.var.host)
@ -137,6 +115,28 @@ server {
end
end
';
location ~* ^/ds-vpath/ {
rewrite /ds-vpath/(.*) /$1 break;
proxy_pass http://172.18.0.4:80;
proxy_redirect off;
client_max_body_size 100m;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $proxy_x_forwarded_host/ds-vpath;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
location / {
proxy_pass http://127.0.0.1:5001;
location ~* /(manifest.json|sw.js|appIcon(.)*\.png|icon.svg|bg-error.png|favicon.ico|debuginfo.md) {
try_files /$basename /index.html =404;