How can I determine on the server-side when an incoming request is HTTPS?
Is there a HTTP environment variable I can use to work开发者_如何转开发 this out?
What are you using at server side. If you are using java servlet then you can get URL information as follow:
String scheme = request.getScheme();
String serverName = request.getServerName();
int portNumber = request.getServerPort();
Apache sets an HTTPS
environment variable to the value 1 or "on" when the request was made trough SSL. Note that this flag is not present on simple HTTP requests.
精彩评论