Permalink
Browse files

Adds letsencrypt support.

  • Loading branch information...
tamasd committed Oct 21, 2016
1 parent 36a6df6 commit a5a856da85ccf37fdb33a59aa8a9a6072e80b4f4
Showing with 6 additions and 0 deletions.
  1. +1 −0 README.md
  2. +1 −0 config.json.sample.full
  3. 0 private/.keep
  4. +4 −0 server.go
View
@@ -47,6 +47,7 @@ If unsure, leave them empty.
* `host`: host to listen on. Defaults to `localhost`.
* `port`: port to listen on. Defaults to `8080`.
* `letsencrypthost`: enables letsencrypt on the specified host. Default is empty.
* `httpaddr`: enables HTTP to HTTPS automatic redirection. The format of the address is `host:port`.
* `httporigin`: if this is set, the HTTP requests will be forced to a separate domain.
* `redirectall`: redirects all HTTP requests to HTTPS if the server is running in HTTPS mode. If this is set to false, only a few pages will be enabled in HTTP mode
View
@@ -17,6 +17,7 @@
"pwauth": true,
"extrabuild": "",
"extensionid": "",
"letsencrypthost": "",
"google": {
"id": "",
"secret": ""
View
No changes.
View
@@ -290,6 +290,10 @@ func (s *WalkhubServer) Start(addr string, certfile string, keyfile string) erro
s.GetF(path, handleIndex)
}
if host := s.cfg.GetString("letsencrypthost"); host != "" {
s.EnableLetsEncrypt("", host)
}
ec := ab.NewEntityController(s.GetDBConnection())
ec.
Add(&User{}, userEntityDelegate{}).

0 comments on commit a5a856d

Please sign in to comment.