1and1 Help Centre Categories

print article

Use Proxy SSL with OS Commerce

Find out what you need to change to get the proxy SSL working with OS e-commerce.

In order to use a Proxy SSL, you will have to rewrite the part that tells the site how to connect to your SSL shared proxy server. Refer to the code below.

/

**
* Generates a Host header for HTTP/1.1 requests
*
* @access private
* @return string
*/
function _generateHostHeader()
{
if ($this->_url->port != 80 AND strcasecmp($this->_url->protocol,
'http') == 0) {
$host = $this->_url->host . ':' . $this->_url->port;

} elseif ($this->_url->port != 443 AND strcasecmp($this->_url->protocol,
'https') == 0) {
$host = $this->_url->host . ':' . $this->_url->port;

} elseif ($this->_url->port == 443 AND strcasecmp($this->_url->protocol,
'https') == 0 AND strpos($this->_url->url, ':443') !== false) {
$host = $this->_url->host . ':' . $this->_url->port;

} else {
$host = $this->_url->host;
}

return $host;
}

For additional information, you may want to reference: