Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
}

//final proxied request url
//for ssl uncomment this line
// /$proxy_request_url = "https://" . rtrim($dest_host, '/ ') . '/' . $proxy_request_url;
// and comment this line
$proxy_request_url = "http://" . rtrim($dest_host, '/ ') . '/' . $proxy_request_url;

/* Init CURL */
Expand All @@ -58,6 +61,8 @@
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
//for ssl uncomment this line
//curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this option is needed here? I'd say it ruins the idea of SSL certificates. If you met this issue the most likely the https/SSL is not configured well on the $dest_host. Or SSL local certificates are outdated.

Can you share your issue details on the pull request please?

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);

Expand Down