ryanhugh / searchneu

Search over Classes, Professors and Employees at NEU!
https://searchneu.com
GNU Affero General Public License v3.0
74 stars 18 forks source link

Redirect to https w/NGINX #102

Open dajinchu opened 5 years ago

dajinchu commented 5 years ago

No need to handle the http=>https at the express level. We should handle that at the NGINX level, which is separates concerns and would be more efficient.

Alternatively, we could also use AWS Elastic application load balancer which would handle the https redirect, as well as the entire SSL cert process. This would be an opportunity to reduce the complexity of our application code!

ryanhugh commented 5 years ago

100% agree. There is actually a setting in CloudFlare to do this too I just turned it on.

However, if we ever have an issue with certbot (eg. cert expires or something) we will have to turn this setting off to be able to connect to the site with http and to get a new cert.

We can also totally do this at nginx level too - certbot actually added some settings to the nginx config to redirect http to https.

Y'all could also investigate AWS Elastic application load balancer or other products for sure!

dajinchu commented 4 years ago

Plan is to use Elastic Beanstalk. Sub tasks: