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 committed Jan 19, 2021
1 parent 5f3c86c commit d124b4c
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,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 @@ -227,6 +243,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 d124b4c

Please sign in to comment.