Add support for root websocket

This commit is contained in:
Wilfried OLLIVIER 2019-02-17 17:45:02 +01:00
parent 4c876fffb8
commit 9eb840c233
3 changed files with 7 additions and 1 deletions

View file

@ -20,6 +20,7 @@ Role Variables
- caddy_www: /var/www/caddy - caddy_www: /var/www/caddy
- reverse_location: reverse destination point - reverse_location: reverse destination point
- reverse_port: port to redirect to - reverse_port: port to redirect to
- rootws: yes/no activate websocket in the / path
- websocket_path: path to websocket (optional) - websocket_path: path to websocket (optional)
- websocket_localtion: reverse destination point for websocket config - websocket_localtion: reverse destination point for websocket config
- websocket_port: websocket port to redirect to - websocket_port: websocket port to redirect to

View file

@ -13,3 +13,5 @@ reverse_port: 8080
vhost_name: default vhost_name: default
websocket: no websocket: no
rootws: no

View file

@ -13,6 +13,9 @@
} }
proxy / http://{{ reverse_location }}:{{ reverse_port }} { proxy / http://{{ reverse_location }}:{{ reverse_port }} {
{% if rootws %}
websocket
{% endif %}
transparent transparent
} }