Set CSP instead of frameAncestors
This commit is contained in:
+4
-7
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user