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: allow 'include' directive in 'if' and 'limit_except' blocks #74

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

dareste
Copy link
Contributor

@dareste dareste commented Oct 9, 2023

Proposed changes

Resolves #72.

The mask ngxAnyConf is defined as "any context except server > if, location > if and location > limit_except".

Given that this mask is only used for defining the valid contexts for the include directive, and given that the contexts listed above are valid for include, it makes sense to modify the ngxAnyConf definition to include such contexts.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • I have updated any relevant documentation (README.md)

@dareste dareste requested a review from a team as a code owner October 9, 2023 11:21
@ornj
Copy link
Member

ornj commented Oct 10, 2023

I don't know why the original definition of this mask omitted if contexts and limit_except. This went all the way back to the original Python without a useful commit message or hint as to why it was implemented this way.

@dareste dareste merged commit fb99b89 into nginxinc:main Oct 25, 2023
2 checks passed
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.

"include" directive is not allowed within an "if" block
3 participants