Tuesday, May 29, 2012

Thanks Javascript!!!

After having problem detecting a secure connection in Nginx/Tomcat, I did an easy work-around using java script!!!:

<script type="text/javascript">
if (window.location.protocol != "https:") {
   window.location = '<%=SecureLandingURL%>';
}
</script>

1 comment:

lena said...

Finding a solution to the issue of detecting a secure connection is always a great accomplishment. Your implementation using JavaScript to redirect to a secure landing URL is a clever workaround. It ensures that users are redirected to the secure version of your website if they are not already accessing it via HTTPS. It's a smart way to prioritize security and provide a seamless user experience. I would like to suggest considering the use of a bulk pickup schedule to maintain cleanliness and friendliness in your city. Having a designated schedule for bulk pickup ensures that waste is managed effectively and the environment remains clean and attractive. By following a regular pickup schedule, we can contribute to a healthier and more pleasant living environment for everyone.