I'm using Revel for a small app and added SSL. When I update the config to point to http.port = 443, requests to port 80 are rejected instead of being forwarded. Is there a way to fix this on the Revel Framework? Thank you.
# The port on which to listen.
http.port = 443
# Whether to use SSL or not.
http.ssl = true
# Path to an X509 certificate file, if using SSL.
http.sslcert = /root/go/src/saml/AlphaCerts/cert.crt
# Path to an X509 certificate key, if using SSL.
http.sslkey = /root/go/src/saml/star_home_com.key
You could add a simple redirect handler yourself.
Try putting this in your
app/init.go
file:Note that in Revel's dev mode, you'll first have to access your app on port 443 to have Revel start up properly before your port 80 redirect code will be run.