app proxy: remove any trailing slash

This commit is contained in:
Girish Ramakrishnan
2022-09-29 18:45:38 +02:00
parent ade77bd8be
commit ed238a1b7d
2 changed files with 6 additions and 2 deletions

View File

@@ -1053,7 +1053,8 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
$scope.proxy.busy = true;
$scope.proxy.error = {};
Client.configureApp($scope.app.id, 'upstream_uri', { upstreamUri: $scope.proxy.upstreamUri }, function (error) {
var upstreamUri = $scope.proxy.upstreamUri.replace(/\/$/, '');
Client.configureApp($scope.app.id, 'upstream_uri', { upstreamUri: upstreamUri }, function (error) {
if (error) return Client.error(error);
$timeout(function () {

View File

@@ -277,7 +277,10 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$tran
sso: !$scope.appInstall.optionalSso ? undefined : ($scope.appInstall.accessRestrictionOption !== 'nosso'),
};
if ($scope.appInstall.upstreamUri) data.upstreamUri = $scope.appInstall.upstreamUri;
if ($scope.appInstall.upstreamUri) {
data.upstreamUri = $scope.appInstall.upstreamUri;
data.upstreamUri = data.upstreamUri.replace(/\/$/, '');
}
var domains = [];
domains.push({ subdomain: data.subdomain, domain: data.domain, type: 'primary' });