SSL frontend

This commit is contained in:
emile 2015-09-11 16:48:52 +02:00
parent 91f95f4fa2
commit cc88e28213
3 changed files with 19 additions and 13 deletions

View file

@ -1,12 +1,10 @@
# /træfɪk/
* Logs
* Default configuration values
* Retry with streams
* Static files
* Licence
* Add traefik.indlude all/enabled policy
* SSL frontend support
* SSL backends support
* Consul support
* README
@ -24,3 +22,5 @@
* ~~Weights~~
* ~~Filter traefik.enabled=false apps~~
* ~~Filter no exposed port apps~~
* ~~Logs~~
* ~~SSL frontend support~~

View file

@ -6,6 +6,7 @@ type GlobalConfiguration struct {
AccessLogsFile string
TraefikLogsFile string
TraefikLogsStdout bool
CertFile, KeyFile string
LogLevel string
Docker *DockerProvider
File *FileProvider

View file

@ -39,6 +39,7 @@ func main() {
if err != nil {
log.Fatal("Error getting level", err)
}
if (len(gloablConfiguration.TraefikLogsFile) > 0 ) {
fi, err := os.OpenFile(gloablConfiguration.TraefikLogsFile, os.O_RDWR | os.O_CREATE | os.O_APPEND, 0666)
if err != nil {
@ -131,7 +132,11 @@ func main() {
}
go func() {
if (len(gloablConfiguration.CertFile) > 0 && len(gloablConfiguration.KeyFile) > 0) {
srv.ListenAndServeTLS(gloablConfiguration.CertFile, gloablConfiguration.KeyFile)
} else {
srv.ListenAndServe()
}
}()
log.Notice("Started")
<-srv.StopChan()