|
|
@@ -1531,6 +1531,16 @@ end}.
|
|
|
{datatype, string}
|
|
|
]}.
|
|
|
|
|
|
+{mapping, "listener.ws.$name.proxy_address_header", "emqx.listeners", [
|
|
|
+ {default, "X-Forwarded-For"},
|
|
|
+ {datatype, string}
|
|
|
+]}.
|
|
|
+
|
|
|
+{mapping, "listener.ws.$name.proxy_port_header", "emqx.listeners", [
|
|
|
+ {default, "X-Forwarded-Port"},
|
|
|
+ {datatype, string}
|
|
|
+]}.
|
|
|
+
|
|
|
{mapping, "listener.ws.$name.proxy_protocol", "emqx.listeners", [
|
|
|
{datatype, flag}
|
|
|
]}.
|
|
|
@@ -1715,6 +1725,16 @@ end}.
|
|
|
{datatype, string}
|
|
|
]}.
|
|
|
|
|
|
+{mapping, "listener.wss.$name.proxy_address_header", "emqx.listeners", [
|
|
|
+ {default, "X-Forwarded-For"},
|
|
|
+ {datatype, string}
|
|
|
+]}.
|
|
|
+
|
|
|
+{mapping, "listener.wss.$name.proxy_port_header", "emqx.listeners", [
|
|
|
+ {default, "X-Forwarded-Port"},
|
|
|
+ {datatype, string}
|
|
|
+]}.
|
|
|
+
|
|
|
{mapping, "listener.wss.$name.proxy_protocol", "emqx.listeners", [
|
|
|
{datatype, flag}
|
|
|
]}.
|
|
|
@@ -1967,6 +1987,8 @@ end}.
|
|
|
{zone, Atom(cuttlefish:conf_get(Prefix ++ ".zone", Conf, undefined))},
|
|
|
{rate_limit, RateLimit(cuttlefish:conf_get(Prefix ++ ".rate_limit", Conf, undefined))},
|
|
|
{proxy_protocol, cuttlefish:conf_get(Prefix ++ ".proxy_protocol", Conf, undefined)},
|
|
|
+ {proxy_address_header, list_to_binary(string:lowercase(cuttlefish:conf_get(Prefix ++ ".proxy_address_header", Conf, "")))},
|
|
|
+ {proxy_port_header, list_to_binary(string:lowercase(cuttlefish:conf_get(Prefix ++ ".proxy_port_header", Conf, "")))},
|
|
|
{proxy_protocol_timeout, cuttlefish:conf_get(Prefix ++ ".proxy_protocol_timeout", Conf, undefined)},
|
|
|
{fail_if_no_subprotocol, cuttlefish:conf_get(Prefix ++ ".fail_if_no_subprotocol", Conf, undefined)},
|
|
|
{supported_subprotocols, string:tokens(cuttlefish:conf_get(Prefix ++ ".supported_subprotocols", Conf, ""), ", ")},
|