1
0
mirror of https://github.com/dkmstr/openuds-gui.git synced 2024-10-26 08:55:23 +03:00

Fixed plugin to correctly launch urls from clientEnabler

This commit is contained in:
Adolfo Gómez García 2020-09-23 14:06:18 +02:00
parent a03a315f6b
commit acc9b7713c

View File

@ -61,6 +61,11 @@ export class Plugin {
// TODO: show the error correctly
this.api.gui.alert(django.gettext('Error launching service'), data.error);
} else {
// Is HTTP access the service returned, or for UDS client?
if (data.url.startsWith('/')) {
this.launchURL(data.url);
return;
}
if (window.location.protocol === 'https:') {
// Ensures that protocol is https also for plugin, fixing if needed UDS provided info
data.url = data.url.replace('uds://', 'udss://');