Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ipv6 handling in redirect middleware #6902

Merged
merged 2 commits into from Jun 16, 2020

Conversation

rtribotte
Copy link
Member

What does this PR do?

This PR fixes the regex used by redirect middleware to handle properly ipv6 in urls
Fixes #5197

Motivation

See #5197

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

@traefiker traefiker added this to the 2.2 milestone Jun 8, 2020
@ldez ldez added the kind/bug/fix a bug fix label Jun 8, 2020
@ldez ldez added this to To review in v2 via automation Jun 8, 2020
@jbdoumenjou
Copy link
Member

I think we may also update the regexp in https://github.com/containous/traefik/blob/v2.2/pkg/provider/traefik/internal.go#L200 with something like ^(http:\/\/(\[[\w:.]+\]|[^:\/]+)?(:\d+)?)\/$ to handle ipv6 with the internal dashboard redirection. WDYT ?

@rtribotte
Copy link
Member Author

rtribotte commented Jun 15, 2020

@jbdoumenjou I agree, i applied your suggestion, thanks.

Copy link
Member

@jbdoumenjou jbdoumenjou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rtribotte rtribotte force-pushed the fix/5197-ipv6-redirect branch 2 times, most recently from 930843f to 594b8bd Compare June 16, 2020 09:19
Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@traefiker traefiker merged commit e5e46bf into traefik:v2.2 Jun 16, 2020
v2 automation moved this from To review to Done Jun 16, 2020
@rtribotte rtribotte deleted the fix/5197-ipv6-redirect branch August 18, 2020 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v2
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants