CURL.SetOptionHAProxyProtocol
-----------------------------

Whether to send an HAProxy PROXY protocol header.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [8.2](newinversion82.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionHAProxyProtocol"; curl; Value ) 

**MBS**( **"CURL.SetOptionHAProxyProtocol";** /\* Whether to send an HAProxy PROXY protocol header. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* The new setting, 1 or 0e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | The new setting, 1 or 0 | 1 |

### Result

Returns OK or error.

### Description

Whether to send an HAProxy PROXY protocol header.  
A value 1 tells the library to send an HAProxy PROXY protocol header at beginning of the connection. The default action is not to send this header.  
This option is primarily useful when sending test requests to a service that expects this header.  
Most applications do not need this option.  
Default 0, do not send HAProxy PROXY protocol header.  
See also [HAPROXYPROTOCOL](https://curl.haxx.se/libcurl/c/CURLOPT_HAPROXYPROTOCOL.html) option in CURL manual.

### See also

- [CURL.SetOptionDefaultProtocol](CURLSetOptionDefaultProtocol.md)
- [CURL.SetOptionRedirProtocols](CURLSetOptionRedirProtocols.md)

### Release notes

- **Version 8.2**
    - Added [CURL.SetOptionDNSShuffleAddresses](http://www.mbsplugins.eu/CURLSetOptionDNSShuffleAddresses.shtml) and [CURL.SetOptionHAProxyProtocol](http://www.mbsplugins.eu/CURLSetOptionHAProxyProtocol.shtml).

### Blog Entries

- [MBS FileMaker Plugin, version 8.2pr8](https://www.mbsplugins.de/archive/2018-05-16/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

Created 16th May 2018 , last changed 28th November 2019

  
[CURL.SetOptionGet](CURLSetOptionGet.md) - [CURL.SetOptionHTTP200Aliases](CURLSetOptionHTTP200Aliases.md)

[HTML Version](CURLSetOptionHAProxyProtocol.shtml)