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

caddyconfig: Error on extra args for route and handle directive family #3740

Merged
merged 1 commit into from
Sep 21, 2020

Conversation

francislavoie
Copy link
Member

Brought up here: https://caddy.community/t/v2-how-do-i-selectively-rewrite-multiple-times/9854

Basically, this disallows extra args on the line after the matcher for route, handle, handle_errors and handle_path. For example, these are now errors:

route @foo bar {
	respond "Foo"
}
handle bar {
	respond "Foo"
}

This is purely an adapter change to be stricter so that users don't have args in their config that do nothing useful (like thinking some args act like a matcher).

@francislavoie francislavoie added the bug 🐞 Something isn't working label Sep 21, 2020
@francislavoie francislavoie added this to the v2.3.0 milestone Sep 21, 2020
@francislavoie francislavoie requested a review from mholt September 21, 2020 00:24
@mholt mholt modified the milestones: v2.3.0, v2.2.0 Sep 21, 2020
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.

Thanks, I think this should even go in 2.2.

@mholt mholt merged commit fe27f9c into caddyserver:master Sep 21, 2020
@francislavoie francislavoie deleted the strict-route-args branch September 21, 2020 20:12
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.

2 participants