Skip to content
This repository has been archived by the owner on Aug 24, 2020. It is now read-only.

Commit

Permalink
Adds letsencrypt support.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasd committed Oct 21, 2016
1 parent 36a6df6 commit a5a856d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions config.json.sample.full
Expand Up @@ -17,6 +17,7 @@
"pwauth": true,
"extrabuild": "",
"extensionid": "",
"letsencrypthost": "",
"google": {
"id": "",
"secret": ""
Expand Down
Empty file added private/.keep
Empty file.
4 changes: 4 additions & 0 deletions server.go
Expand Up @@ -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{}).
Expand Down

0 comments on commit a5a856d

Please sign in to comment.