service: Option to not pass host header to container service
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
service_domains: []
|
service_domains: []
|
||||||
service_vhost_locations: []
|
service_vhost_locations: []
|
||||||
|
service_proxy_pass_host_header: true
|
||||||
|
|
||||||
service_container_additional_networks: []
|
service_container_additional_networks: []
|
||||||
service_container_user: ""
|
service_container_user: ""
|
||||||
|
|||||||
@@ -20,8 +20,14 @@ argument_specs:
|
|||||||
- Required if service_domains is not empty.
|
- Required if service_domains is not empty.
|
||||||
type: int
|
type: int
|
||||||
required: false
|
required: false
|
||||||
|
service_proxy_pass_host_header:
|
||||||
|
description: Passed to vhost role as vhost_proxy_pass_header
|
||||||
|
type: bool
|
||||||
|
required: false
|
||||||
|
default: true
|
||||||
service_vhost_locations:
|
service_vhost_locations:
|
||||||
description: Passed to vhost role as vhost_locations
|
description: Passed to vhost role as vhost_locations
|
||||||
|
type: list
|
||||||
required: false
|
required: false
|
||||||
default: []
|
default: []
|
||||||
|
|
||||||
|
|||||||
@@ -33,4 +33,5 @@
|
|||||||
vhost_domains: "{{ service_domains }}"
|
vhost_domains: "{{ service_domains }}"
|
||||||
vhost_proxy_target_netproto: unix
|
vhost_proxy_target_netproto: unix
|
||||||
vhost_proxy_target_socket: "/run/{{ service_name }}-socat.sock"
|
vhost_proxy_target_socket: "/run/{{ service_name }}-socat.sock"
|
||||||
|
vhost_proxy_headers: "{{ _service_proxy_headers }}"
|
||||||
vhost_locations: "{{ service_vhost_locations }}"
|
vhost_locations: "{{ service_vhost_locations }}"
|
||||||
|
|||||||
@@ -19,3 +19,7 @@ _service_container_secrets: >
|
|||||||
|
|
||||||
_service_container_requires: "{{ service_requires + ([_service_database_name + '.service'] if _service_setup_database else []) }}"
|
_service_container_requires: "{{ service_requires + ([_service_database_name + '.service'] if _service_setup_database else []) }}"
|
||||||
_service_container_wants: "{{ service_wants + ([service_name + '-socat.socket'] if service_domains | length > 0 else []) }}"
|
_service_container_wants: "{{ service_wants + ([service_name + '-socat.socket'] if service_domains | length > 0 else []) }}"
|
||||||
|
|
||||||
|
_service_replacement_host_header:
|
||||||
|
Host: "{{ service_name }}:{{ service_container_http_port }}"
|
||||||
|
_service_proxy_headers: "{{ _service_replacement_host_header if not service_proxy_pass_host_header else {} }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user