Fix collabora service
This commit is contained in:
parent
ae255f897f
commit
e719ff9e3c
1 changed files with 32 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue