mirror of
https://github.com/containous/traefik.git
synced 2025-10-13 11:33:19 +03:00
Redirection: permanent move option.
This commit is contained in:
committed by
Traefiker
parent
c944d203fb
commit
58d6681824
@@ -456,10 +456,13 @@ func shouldProcessIngress(ingressClass string) bool {
|
||||
}
|
||||
|
||||
func getFrontendRedirect(i *v1beta1.Ingress) *types.Redirect {
|
||||
permanent := getBoolValue(i.Annotations, annotationKubernetesRedirectPermanent, false)
|
||||
|
||||
redirectEntryPoint := getStringValue(i.Annotations, annotationKubernetesRedirectEntryPoint, "")
|
||||
if len(redirectEntryPoint) > 0 {
|
||||
return &types.Redirect{
|
||||
EntryPoint: redirectEntryPoint,
|
||||
Permanent: permanent,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,6 +472,7 @@ func getFrontendRedirect(i *v1beta1.Ingress) *types.Redirect {
|
||||
return &types.Redirect{
|
||||
Regex: redirectRegex,
|
||||
Replacement: redirectReplacement,
|
||||
Permanent: permanent,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user