Skip to content

Commit

Permalink
elb_application_lb: test a rule based on http-header
Browse files Browse the repository at this point in the history
This should initially fail and be fixed the day ansible-collections/amazon.aws#188
is merged.

See: ansible-collections/amazon.aws#187
See: ansible-collections#117
  • Loading branch information
goneri authored and tremble committed Mar 16, 2021
1 parent d24d8f1 commit 117f215
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,22 @@
- Type: fixed-response
FixedResponseConfig: "{{ FixedResponseActionConfig }}"
Rules:
- Conditions:
- Field: http-header
HttpHeaderConfig:
Field: 'User-Agent'
Values: ['*Trident/7:0*rv:*']
- Field: http-header
HttpHeaderConfig:
Field: 'X-Something'
Values: ['foobar']
Priority: '1'
Actions:
- Type: fixed-response
FixedResponseConfig:
StatusCode: "200"
ContentType: "text/html"
MessageBody: "<b>Hello World!</b>"
- Conditions:
- Field: path-pattern
Values:
Expand Down Expand Up @@ -210,6 +226,22 @@
- Type: fixed-response
FixedResponseConfig: "{{ FixedResponseActionConfig }}"
Rules:
- Conditions:
- Field: http-header
HttpHeaderConfig:
HttpHeaderName: 'User-Agent'
Values: ['*Trident/7:0*rv:*']
- Field: http-header
HttpHeaderConfig:
HttpHeaderName: 'X-Something'
Values: ['foobar']
Priority: '1'
Actions:
- Type: fixed-response
FixedResponseConfig:
StatusCode: "200"
ContentType: "text/html"
MessageBody: "<b>Hello World!</b>"
- Conditions:
- Field: path-pattern
Values:
Expand Down

0 comments on commit 117f215

Please sign in to comment.