Reputation: 1014
I added domain to my dokku app
dokku domains:add myapp example.com
then I encrypted the app connection
dokku letsencrypt myapp
the problem is when I deployed my app it deployed to http
and https
connections
=====> Application deployed:
http://example.com
https://example.com
My question is how to make dokku deploy app to https
connection only
The reason behind make dokku only deploy app to
https
connection
Because if app deploy to
http
connection then the attacker can access my app via requestedhttp
connectionhttp://example.com
using postman (for example or other tool). An example of this case isheruko.com
it is encrypted using Letsencrypt but if you try to make request using http connectionhttp://heruko.com
via postman then success response will returned.Another reason that if the
https
certificate expires then the attacker can access my app via http connection
Upvotes: 1
Views: 413
Reputation: 2060
Dokku should redirect any requests to http-URLs to the respective https-URLs. So your visitors should be protected.
It is not a problem if an attacker accesses your app using http. The only difference is that anyone between your server and the hacker could intercept and modify the request data. But your server is not less secured when the http-URL is used.
Https is only used to protect the data between your visitors and your server. It does not protect your server in any way.
Upvotes: 1