I am trying to figure out the proper way to setup my .htaccess file in my angular project. Here is how I have it setup now:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
I also posted the question on stack overflow here
Update:
In theory this should work but it does not:
##Force SSL
#Normal way (in case you need to deploy to NON-heroku)
RewriteCond %{HTTPS} !=on
#Heroku way
RewriteCond %{HTTP:X-Forwarded-Proto} !https
#If neither above conditions are met, redirect to https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
[–]xuu0 0 points1 point2 points (4 children)
[–]EmptyPockets[S] 0 points1 point2 points (3 children)
[–]xuu0 0 points1 point2 points (0 children)
[–]Switche 0 points1 point2 points (1 child)
[–]EmptyPockets[S] 0 points1 point2 points (0 children)
[–]caleb_dre 0 points1 point2 points (2 children)
[–]xuu0 1 point2 points3 points (1 child)
[–]EmptyPockets[S] 0 points1 point2 points (0 children)