mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-02-28 09:22:10 +07:00
Add tests on proxy protocol
This commit is contained in:
@@ -268,6 +268,8 @@
|
|||||||
https_proxy_protocol_port: [20443]
|
https_proxy_protocol_port: [20443]
|
||||||
template: '_base'
|
template: '_base'
|
||||||
ssl_name: 'test-ssl.local'
|
ssl_name: 'test-ssl.local'
|
||||||
|
headers:
|
||||||
|
'X-Proxy-Protocol': '1'
|
||||||
- name: '{{ ngrok.stdout }}'
|
- name: '{{ ngrok.stdout }}'
|
||||||
proto: ['http', 'https']
|
proto: ['http', 'https']
|
||||||
template: '_base'
|
template: '_base'
|
||||||
@@ -516,6 +518,28 @@
|
|||||||
register: notdefaultssl
|
register: notdefaultssl
|
||||||
failed_when: notdefaultssl.x_ansible_default is defined
|
failed_when: notdefaultssl.x_ansible_default is defined
|
||||||
|
|
||||||
|
|
||||||
|
# --------------------------------
|
||||||
|
# Check Proxy protocol
|
||||||
|
# --------------------------------
|
||||||
|
- name: SHELL | Check HTTP proxy protocol
|
||||||
|
shell: curl -I --haproxy-protocol http://test-ssl-proxy-protocol.local:20080 | grep -qi 'X-Proxy-Protocol'
|
||||||
|
args:
|
||||||
|
executable: /bin/sh
|
||||||
|
warn: no
|
||||||
|
changed_when: false
|
||||||
|
tags:
|
||||||
|
- skip_ansible_lint
|
||||||
|
|
||||||
|
- name: SHELL | Check HTTPS proxy protocol
|
||||||
|
shell: curl -I --haproxy-protocol -k https://test-ssl-proxy-protocol.local:20443 | grep -qi 'X-Proxy-Protocol'
|
||||||
|
args:
|
||||||
|
executable: /bin/sh
|
||||||
|
warn: no
|
||||||
|
changed_when: false
|
||||||
|
tags:
|
||||||
|
- skip_ansible_lint
|
||||||
|
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
# Check HTTP2
|
# Check HTTP2
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user