SSL frontend
This commit is contained in:
parent
91f95f4fa2
commit
cc88e28213
3 changed files with 19 additions and 13 deletions
|
@ -1,12 +1,10 @@
|
||||||
# /træfɪk/
|
# /træfɪk/
|
||||||
|
|
||||||
* Logs
|
|
||||||
* Default configuration values
|
* Default configuration values
|
||||||
* Retry with streams
|
* Retry with streams
|
||||||
* Static files
|
* Static files
|
||||||
* Licence
|
* Licence
|
||||||
* Add traefik.indlude all/enabled policy
|
* Add traefik.indlude all/enabled policy
|
||||||
* SSL frontend support
|
|
||||||
* SSL backends support
|
* SSL backends support
|
||||||
* Consul support
|
* Consul support
|
||||||
* README
|
* README
|
||||||
|
@ -24,3 +22,5 @@
|
||||||
* ~~Weights~~
|
* ~~Weights~~
|
||||||
* ~~Filter traefik.enabled=false apps~~
|
* ~~Filter traefik.enabled=false apps~~
|
||||||
* ~~Filter no exposed port apps~~
|
* ~~Filter no exposed port apps~~
|
||||||
|
* ~~Logs~~
|
||||||
|
* ~~SSL frontend support~~
|
||||||
|
|
|
@ -6,6 +6,7 @@ type GlobalConfiguration struct {
|
||||||
AccessLogsFile string
|
AccessLogsFile string
|
||||||
TraefikLogsFile string
|
TraefikLogsFile string
|
||||||
TraefikLogsStdout bool
|
TraefikLogsStdout bool
|
||||||
|
CertFile, KeyFile string
|
||||||
LogLevel string
|
LogLevel string
|
||||||
Docker *DockerProvider
|
Docker *DockerProvider
|
||||||
File *FileProvider
|
File *FileProvider
|
||||||
|
|
|
@ -39,6 +39,7 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Error getting level", err)
|
log.Fatal("Error getting level", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len(gloablConfiguration.TraefikLogsFile) > 0 ) {
|
if (len(gloablConfiguration.TraefikLogsFile) > 0 ) {
|
||||||
fi, err := os.OpenFile(gloablConfiguration.TraefikLogsFile, os.O_RDWR | os.O_CREATE | os.O_APPEND, 0666)
|
fi, err := os.OpenFile(gloablConfiguration.TraefikLogsFile, os.O_RDWR | os.O_CREATE | os.O_APPEND, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -131,7 +132,11 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
|
if (len(gloablConfiguration.CertFile) > 0 && len(gloablConfiguration.KeyFile) > 0) {
|
||||||
|
srv.ListenAndServeTLS(gloablConfiguration.CertFile, gloablConfiguration.KeyFile)
|
||||||
|
} else {
|
||||||
srv.ListenAndServe()
|
srv.ListenAndServe()
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
log.Notice("Started")
|
log.Notice("Started")
|
||||||
<-srv.StopChan()
|
<-srv.StopChan()
|
||||||
|
|
Loading…
Reference in a new issue