1
0
Fork 0

Redirection: permanent move option.

This commit is contained in:
Ludovic Fernandez 2018-01-31 19:10:04 +01:00 committed by Traefiker
parent c944d203fb
commit 58d6681824
83 changed files with 622 additions and 8611 deletions

View file

@ -338,9 +338,12 @@ func (p *Provider) getServers(tasks []state.Task) map[string]types.Server {
}
func getRedirect(task state.Task) *types.Redirect {
permanent := getBoolValue(task, label.TraefikFrontendRedirectPermanent, false)
if hasLabel(task, label.TraefikFrontendRedirectEntryPoint) {
return &types.Redirect{
EntryPoint: getStringValue(task, label.TraefikFrontendRedirectEntryPoint, ""),
Permanent: permanent,
}
}
@ -349,6 +352,7 @@ func getRedirect(task state.Task) *types.Redirect {
return &types.Redirect{
Regex: getStringValue(task, label.TraefikFrontendRedirectRegex, ""),
Replacement: getStringValue(task, label.TraefikFrontendRedirectReplacement, ""),
Permanent: permanent,
}
}