backward compatibility: /lool/convert-to endpoint
Signed-off-by: Andras Timar <andras.timar@collabora.com> Change-Id: I8a3930a01a18be32bee657142f872ba58383594dpull/3689/head
parent
dcfe16eec1
commit
b6182877a8
|
@ -33,3 +33,6 @@
|
||||||
# Download as, Fullscreen presentation and Image upload operations
|
# Download as, Fullscreen presentation and Image upload operations
|
||||||
ProxyPass /cool http://127.0.0.1:9980/cool
|
ProxyPass /cool http://127.0.0.1:9980/cool
|
||||||
ProxyPassReverse /cool http://127.0.0.1:9980/cool
|
ProxyPassReverse /cool http://127.0.0.1:9980/cool
|
||||||
|
# Compatibility with integrations that use the /lool/convert-to endpoint
|
||||||
|
ProxyPass /lool http://127.0.0.1:9980/cool
|
||||||
|
ProxyPassReverse /lool http://127.0.0.1:9980/cool
|
||||||
|
|
|
@ -26,7 +26,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
# download, presentation and image upload
|
# download, presentation and image upload
|
||||||
location ~ ^/cool {
|
# we accept 'lool' to be backward compatible
|
||||||
|
location ~ ^/(c|l)ool {
|
||||||
proxy_pass http://localhost:9980;
|
proxy_pass http://localhost:9980;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2804,9 +2804,12 @@ private:
|
||||||
requestDetails.equals(2, "ws") && requestDetails.isWebSocket())
|
requestDetails.equals(2, "ws") && requestDetails.isWebSocket())
|
||||||
handleClientWsUpgrade(request, requestDetails, disposition, socket);
|
handleClientWsUpgrade(request, requestDetails, disposition, socket);
|
||||||
|
|
||||||
else if (!requestDetails.isWebSocket() && requestDetails.equals(RequestDetails::Field::Type, "cool"))
|
else if (!requestDetails.isWebSocket() &&
|
||||||
|
(requestDetails.equals(RequestDetails::Field::Type, "cool") ||
|
||||||
|
requestDetails.equals(RequestDetails::Field::Type, "lool")))
|
||||||
{
|
{
|
||||||
// All post requests have url prefix 'cool'.
|
// All post requests have url prefix 'cool', except when the prefix
|
||||||
|
// is 'lool' e.g. when integrations use the old /lool/convert-to endpoint
|
||||||
handlePostRequest(requestDetails, request, message, disposition, socket);
|
handlePostRequest(requestDetails, request, message, disposition, socket);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3805,6 +3808,8 @@ private:
|
||||||
Poco::JSON::Object::Ptr convert_to = new Poco::JSON::Object;
|
Poco::JSON::Object::Ptr convert_to = new Poco::JSON::Object;
|
||||||
Poco::Dynamic::Var available = allowConvertTo(socket->clientAddress(), request);
|
Poco::Dynamic::Var available = allowConvertTo(socket->clientAddress(), request);
|
||||||
convert_to->set("available", available);
|
convert_to->set("available", available);
|
||||||
|
if (available)
|
||||||
|
convert_to->set("endpoint", "/cool/convert-to");
|
||||||
|
|
||||||
Poco::JSON::Object::Ptr capabilities = new Poco::JSON::Object;
|
Poco::JSON::Object::Ptr capabilities = new Poco::JSON::Object;
|
||||||
capabilities->set("convert-to", convert_to);
|
capabilities->set("convert-to", convert_to);
|
||||||
|
|
Loading…
Reference in New Issue