diff --git a/README.md b/README.md index 867e26b..63e9836 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ Role Variables - reverse_location: reverse destination point - reverse_port: port to redirect to +- websocket_path: path to websocket (optional) +- websocket_localtion: reverse destination point for websocket config +- websocket_port: websocket port to redirect to + - vhost_name: name of the vhost Dependencies diff --git a/templates/reverse.caddy.j2 b/templates/reverse.caddy.j2 index 81df421..3c1beb2 100644 --- a/templates/reverse.caddy.j2 +++ b/templates/reverse.caddy.j2 @@ -16,6 +16,12 @@ transparent } +{% if websocket_path is defined %} + proxy {{ websocket_path }} http://{{ websocket_location }}:{{ websocket_port }} { + websocket + } +{% endif %} + log {{ caddy_logs }}/{{ vhost_name }}/access.log { rotate_size 100 rotate_age 30