Add proxy protocol support
Adds a server-specific parameter, "use_proxy_protocol". If enabled, a header string is sent to the backend when a routing session connection changes state to MXS_AUTH_STATE_CONNECTED. The string contains the real client IP and port.
This commit is contained in:
@ -94,6 +94,7 @@ typedef struct server
|
||||
uint8_t charset; /**< Default server character set */
|
||||
bool is_active; /**< Server is active and has not been "destroyed" */
|
||||
bool created_online; /**< Whether this server was created after startup */
|
||||
bool use_proxy_protocol; /**< Send proxy-protocol header when connecting client sessions. */
|
||||
#if defined(SS_DEBUG)
|
||||
skygw_chk_t server_chk_tail;
|
||||
#endif
|
||||
@ -190,6 +191,8 @@ enum
|
||||
(((server)->status & (SERVER_RUNNING|SERVER_MASTER|SERVER_SLAVE|SERVER_MAINT)) == \
|
||||
(SERVER_RUNNING|SERVER_MASTER|SERVER_SLAVE))
|
||||
|
||||
extern const char USE_PROXY_PROTOCOL[];
|
||||
|
||||
/**
|
||||
* @brief Allocate a new server
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user