Geekiri
Geekiri

Reputation: 1

Checking if request to Apache webserver is https or not in tomcat behind apache web server

I am running tomcat behind apache webserver. Apache webserver receives the https request and send the http request to tomcat. I want to know if there is a way to know if the request to the apache server was https or just http. Is there a way to know? Appreciate the help!

Upvotes: 0

Views: 2028

Answers (1)

sourcedelica
sourcedelica

Reputation: 24040

If you have set up reverse proxying using AJP then you can simply call request.isSecure() to see if the request was HTTPS.

See The Apache Tomcat Connector - Reverse Proxy HowTo for details.

Upvotes: 1

Related Questions