Support the X-Forwarded-Proto insertion header
This is a follow up of Id017bb277eebae98f0441663e41d07b40b6e3e38, which added support for the X-Forwarded-Proto insertion header on listeners. Change-Id: Ifdf73015e12fea1ddac2c6168f34f1c452a9a9cb Story: 2004165 Task: 27642
This commit is contained in:
parent
b4bfea8545
commit
90aa0f41f4
@ -34,7 +34,7 @@
|
||||
<strong translate>Insert Headers:</strong>
|
||||
<translate>
|
||||
Additional headers insertion into HTTP header,
|
||||
only "X-Forwarded-For" and "X-Forwarded-Port" are supported.
|
||||
only "X-Forwarded-For", "X-Forwarded-Port" and "X-Forwarded-Proto" are supported.
|
||||
</translate>
|
||||
</p>
|
||||
<p>
|
||||
|
@ -184,7 +184,22 @@
|
||||
id="x_forwarded_port"
|
||||
ng-model="model.spec.listener.insert_headers['X-Forwarded-Port']">
|
||||
<label for="x_forwarded_port">
|
||||
<span translate>X-Forwarded-port</span>
|
||||
<span translate>X-Forwarded-Port</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-8 col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="themable-checkbox">
|
||||
<input type="checkbox"
|
||||
ng-true-value="'True'"
|
||||
ng-false-value="''"
|
||||
id="x_forwarded_proto"
|
||||
ng-model="model.spec.listener.insert_headers['X-Forwarded-Proto']">
|
||||
<label for="x_forwarded_proto">
|
||||
<span translate>X-Forwarded-Proto</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -37,7 +37,8 @@
|
||||
sni_container_refs: ['container2'],
|
||||
insert_headers: {
|
||||
'X-Forwarded-For': 'True',
|
||||
'X-Forwarded-Port': 'True'
|
||||
'X-Forwarded-Port': 'True',
|
||||
'X-Forwarded-Proto': 'True'
|
||||
}
|
||||
},
|
||||
pool: {
|
||||
@ -2490,6 +2491,20 @@
|
||||
});
|
||||
});
|
||||
|
||||
describe('Model visible resources (edit listener, no x forwared proto)', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
delete listenerResources.listener.insert_headers['X-Forwarded-Proto'];
|
||||
delete listenerResources.pool;
|
||||
model.initialize('listener', '1234');
|
||||
scope.$apply();
|
||||
});
|
||||
|
||||
it('should only show listener details', function() {
|
||||
expect(model.context.resource).toEqual('listener');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Model visible resources (edit listener, no pool)', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Adds the ability to set the X-Forwarded-Proto insertion header on
|
||||
listeners.
|
Loading…
Reference in New Issue
Block a user