Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f3386d548 | |||
| 660e58d36a | |||
| 179dd3d850 | |||
| 4e4d436e7a | |||
| 0fcbe0d0ad |
@@ -64,7 +64,8 @@ func (s *Service) Register() error {
|
||||
Port: s.port,
|
||||
Tags: s.getTags(),
|
||||
Check: &consul.AgentServiceCheck{
|
||||
TTL: s.ttl.String(),
|
||||
TTL: s.ttl.String(),
|
||||
DeregisterCriticalServiceAfter: "5s",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -138,7 +139,7 @@ func (s *Service) healthCheck() (bool, error) {
|
||||
func (s *Service) getTags() []string {
|
||||
tags := []string{
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers." + s.Name + ".rule=Headers(`X-API-SERVICE`, `" + s.Name + "`)",
|
||||
"traefik.http.routers." + s.Name + ".rule=Header(`X-API-SERVICE`, `" + s.Name + "`)",
|
||||
"traefik.http.routers." + s.Name + ".entryPoints=https",
|
||||
"traefik.http.routers." + s.Name + ".tls=true",
|
||||
"traefik.http.routers." + s.Name + ".service=" + s.Name,
|
||||
|
||||
Reference in New Issue
Block a user