Fix collabora service

This commit is contained in:
Manuel Thalmann 2024-12-04 16:59:30 +01:00
parent 86576476ba
commit 5411281d95

View file

@ -93,10 +93,40 @@ begin
end
end
function getServiceLocations -V services -a index
function getServiceLocations -V services -V office -a index
set -l i (math (math (math $index - 1) / 2 "*" 3) + 1)
set -l name $services[$i]
printf "%s\0" "$name" /
if [ "$name" != "$office" ]
printf "%s\0" "$name" / ""
else
printf "%s\0" \
"$name" "^~ /browser" "static files" \
"$name" "^~ /hosting/discovery" "WOPI discovery URL" \
"$name" "^~ /hosting/capabilities" "Capabilities" \
"$name" "~ ^/cool/(.*)/ws\$" "main websocket" \
"$name" "~ ^/(c|l)ool" "download, presentation and image upload" \
"$name" "^~ /cool/adminws" "Admin Console websocket"
end
end
function getServiceLocationConfig -a domain s location -V office -V flood
if [ "$s" = "$office" ]
set -l argv $argv[4..]
getServiceDefaultProxy $domain $s "$location" --scheme https $argv
else
getServiceDefaultProxy $argv --path "$location"
end
end
function getExtraLocationSettings -a domain s location -V service
if string match --regex '^(~ \^|\^~ )/cool/(.*)ws\$?$' "$location" >/dev/null
printf "%s\n" \
'# Websocket' \
"proxy_http_version 1.1;" \
'proxy_set_header Upgrade $http_upgrade;' \
'proxy_set_header Connection "upgrade";'
end
end
function getExtraBackupPatterns