Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

Relaibility of $_SERVER['HTTPS'] if user coming through proxy server?


Hi, this may be a stupid question, but will the value of $_SERVER['HTTPS'] be affected if a user coming to my site through a proxy server?  I encountered some reliability issues around usign the $_SERVER['HTTP-REFERRER'] variable.  The PHP documentation mentions that HTTP-REFERRER is not reliabile, but makes no mention of ['HTTPS'].

Is it a reliable method? What is people's experience using $_SERVER['HTTPS'], especially in regards to proxy servers, etc?

Thanks for your help!
0
lauriebloyer
Asked:
lauriebloyer
  • 3
1 Solution
 
hernst42Commented:
$_SERVER['HTTPS'] is always set if the connection to your server is made via SSL regardingless wether the user uses a proxy or not.
0
 
hernst42Commented:
the HTTP-REFERRER is set on the information given by the browser, so some proxies may remove that information from the clients request and you may not relia on that.
the  $_SERVER['HTTPS'] is set by the server and not taken from any information given by the user/browser
0
 
_GeG_Commented:
afaik you cannot use a https connection over a proxy
0
 
hernst42Commented:
If the proxy support SSL/https you can use the proxy also with https. Then the proxy only bypasses the connection. The proxy can't see which information is tunneld via https, it only transfers the data whichout any caching.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now