| 1 |
= ranch_proxy_header:to_connection_info(3) |
| 2 |
|
| 3 |
== Name |
| 4 |
|
| 5 |
ranch_proxy_header:to_connection_info - Convert proxy_info() to ssl:connection_info() |
| 6 |
|
| 7 |
== Description |
| 8 |
|
| 9 |
[source,erlang] |
| 10 |
---- |
| 11 |
to_connection_info(ProxyInfo :: proxy_info()) |
| 12 |
-> ssl:connection_info() |
| 13 |
---- |
| 14 |
|
| 15 |
Convert `ranch_proxy_header:proxy_info()` information |
| 16 |
to the `ssl:connection_info()` format returned by |
| 17 |
`ssl:connection_information/1,2`. |
| 18 |
|
| 19 |
== Arguments |
| 20 |
|
| 21 |
ProxyInfo:: |
| 22 |
|
| 23 |
The PROXY protocol information. |
| 24 |
|
| 25 |
== Return value |
| 26 |
|
| 27 |
Connection information is returned as a proplist. |
| 28 |
|
| 29 |
Because the PROXY protocol header includes limited |
| 30 |
information, only the keys `protocol`, `selected_cipher_suite` |
| 31 |
and `sni_hostname` will be returned, at most. All keys |
| 32 |
are optional. |
| 33 |
|
| 34 |
== Changelog |
| 35 |
|
| 36 |
* *2.1*: Function introduced. |
| 37 |
|
| 38 |
== Examples |
| 39 |
|
| 40 |
.Convert the PROXY protocol information |
| 41 |
[source,erlang] |
| 42 |
---- |
| 43 |
ConnInfo = ranch_proxy_header:to_connection_info(ProxyInfo). |
| 44 |
---- |
| 45 |
|
| 46 |
== See also |
| 47 |
|
| 48 |
link:man:ranch_proxy_header:parse(3)[ranch_proxy_header:parse(3)], |
| 49 |
link:man:ranch_proxy_header(3)[ranch_proxy_header(3)] |