diff --git a/src/views/app.html b/src/views/app.html index c0d8f2d42..6cf0d67ee 100644 --- a/src/views/app.html +++ b/src/views/app.html @@ -624,14 +624,14 @@
- +
- -

Provide a space-separated list of domains that can embed this app

- + +

Setting this option will override any CSP headers sent by the app itself

+
diff --git a/src/views/app.js b/src/views/app.js index 1b14ebf38..d55bc783e 100644 --- a/src/views/app.js +++ b/src/views/app.js @@ -494,24 +494,21 @@ angular.module('Application').controller('AppController', ['$scope', '$location' success: false, robotsTxt: '', - frameAncestors: '', + csp: '', show: function () { $scope.security.error = {}; $scope.security.robotsTxt = $scope.app.reverseProxyConfig.robotsTxt || ''; - $scope.security.frameAncestors = ($scope.app.reverseProxyConfig.frameAncestors || []).join(' '); + $scope.security.csp = $scope.app.reverseProxyConfig.csp || ''; }, submit: function () { $scope.security.busy = true; $scope.security.error = {}; - var fa = $scope.security.frameAncestors.split(' ').map(function (t) { return t.trim(); }).filter(function (t) { return !!t; }); - var reverseProxyConfig = { - robotsTxt: $scope.security.robotsTxt, - frameAncestors: fa, - hideHeaders: [] + robotsTxt: $scope.security.robotsTxt || null, // empty string resets + csp: $scope.security.csp || null // empty string resets }; Client.configureApp($scope.app.id, 'reverse_proxy', reverseProxyConfig, function (error) {