Redirect all requests from HTTP to HTTPS un Node.js and Express

The first step will be to create a method to guess if the HTTP request comes from HTTP or HTTPS (secure or not secure). In some context like AWS or Heroku you will have to ask by the header x-forwarded-proto instead of req.secure. Have in mind that req.secure will return always false if there is … Continue reading Redirect all requests from HTTP to HTTPS un Node.js and Express

A template of Java web and Heroku

I've worked in several projects with Java, specially Java web using Tomcat as a web container and then Glassfish as application server. Lastly I'm working in Java projects deployed on Heroku, an amazing platform acquired by Salesorce. I faced many problems configuring deployment, JPA with Tomcat, oauth Salesforce flow, etc. so I decided to gather … Continue reading A template of Java web and Heroku