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

Modified host regex to match alternative syntax #15

Closed
wants to merge 1 commit into from

Conversation

dchidell
Copy link
Contributor

@dchidell dchidell commented Aug 7, 2020

The following host rule syntax is valid within traefik:

"Host(`subdomain.domain.com`,`subdomain2.domain.com`,`subdomain3.domain.com`)"

This configuration was incorrectly parsed previously, and the 'Host' portion
of regex is safe to remove based on the "if 'Host' in value:" check.

The following host rule syntax is valid within traefik:

"Host(`subdomain.domain.com`,`subdomain2.domain.com`,`subdomain3.domain.com`)"

This configuration was incorrectly parsed previously, and the 'Host' portion
of regex is safe to remove based on the "if 'Host' in value:" check.
@dchidell
Copy link
Contributor Author

Sorted the regex a little here, since capital letters and numbers are valid (caps will be normalised by CloudFlare).

@mbjurstrom
Copy link
Contributor

This is a good change. The same change also need to be applied to the check_service_t2 version btw.

mbjurstrom added a commit to mbjurstrom/docker-traefik-cloudflare-companion that referenced this pull request Oct 6, 2020
The following host rule syntax is valid within traefik:

"Host(`subdomain.domain.com`,`subdomain2.domain.com`,`subdomain3.domain.com`)"

This configuration was incorrectly parsed previously, and the 'Host' portion
of regex is safe to remove based on the "if 'Host' in value:" check.

Originally added by dchidell at tiredofit#15 . 
Just updated it for the current code base. Updated the check_service_t2 method as well as updated the documentation


Fixes: tiredofit#16
mbjurstrom added a commit to mbjurstrom/docker-traefik-cloudflare-companion that referenced this pull request Oct 6, 2020
The following host rule syntax is valid within traefik:

"Host(`subdomain.domain.com`,`subdomain2.domain.com`,`subdomain3.domain.com`)"

This configuration was incorrectly parsed previously, and the 'Host' portion
of regex is safe to remove based on the "if 'Host' in value:" check.

Originally added by dchidell at tiredofit#15 . 
Just updated it for the current code base. Updated the check_service_t2 method as well as updated the documentation


Fixes: tiredofit#16
@tiredofit
Copy link
Owner

tiredofit commented Oct 7, 2020

Hi @dchidell - I waited too long to approve this. I just went through my tests now as I was initially resistant to this PR, but it is sound.
@mbjurstrom patched it up in a seperate PR to handle the pure python implementation of this image I brought forth in 6.0.0
Thanks for your work!

I've given you credit for 6.3.0

@tiredofit tiredofit closed this Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants