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

headers: Fix Caddyfile parsing for request_header with matchers #4085

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

francislavoie
Copy link
Member

Fixes #4084

The first token needs to be skipped with h.Next(), otherwise the matcher token is read as the header field.

@francislavoie francislavoie added the bug 🐞 Something isn't working label Mar 23, 2021
@francislavoie francislavoie added this to the v2.4.0 milestone Mar 23, 2021
@silverbackdan
Copy link

Would you be able to give me an idea of a roadmap for this PR to be merged and available to install from a Docker image just so I stick something in my diary to sort out my hacky workaround?

@francislavoie
Copy link
Member Author

If you want to use it now, you can make a custom build by building from this branch:

xcaddy build caddyfile-request-header

There's instructions on https://hub.docker.com/_/caddy, see the "Adding custom Caddy modules" section (you don't need to add plugins with --with)

Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

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

Ah, gracias!

@mholt mholt merged commit f1c3668 into master Mar 29, 2021
@francislavoie francislavoie deleted the caddyfile-request-header branch March 29, 2021 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

request_header directive broken with matcher
3 participants