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

Add validation for location $priority #223

Merged
merged 1 commit into from
Jan 6, 2014
Merged

Add validation for location $priority #223

merged 1 commit into from
Jan 6, 2014

Conversation

3flex
Copy link
Contributor

@3flex 3flex commented Jan 3, 2014

Valid range changed to 401-599:

vhost SSL header has priority 700. If $priority is set to 400 (which resolves to 400+300=700 for SSL locations), then it would conflict with the priority of the header. It must be 401 or higher to avoid this.

Top end of range is limited to 599 to reflect documentation however it could be increased to 698 and still provide expected behavior.

Current default priorities:

  • 001 HTTP header
  • 500 nginx::resource::location default (included when $ssl_only != true, which is default)
  • 699 HTTP footer
  • 700 SSL header
  • 800 nginx::resource::location default (included when $ssl == true). Is $priority + 300.
  • 999 SSL footer

Non-conflicting HTTP location fragment priorities: 002-698. Means $priority valid range is 002-698.
Non-conflicting SSL location fragment priorities: 701-998. Means $priority valid range is 401-698.

Documentation says valid range is 400-499 and 501-599. This is correct for HTTP but is incorrect for SSL (the range should be 401-499).

Valid range changed to 401-599:

vhost SSL header has priority 700. If $priority is set to 400 (which
resolves to 400+300=700 for SSL locations), then it would conflict with
the priority of the header. It must be 401 or higher to avoid this.

Top end of range is limited to 599 to reflect documentation however it
could be increased to 698 and still provide expected behavior.
@jfryman
Copy link
Contributor

jfryman commented Jan 6, 2014

Makes good sense.

jfryman pushed a commit that referenced this pull request Jan 6, 2014
Add validation for location $priority
@jfryman jfryman merged commit d1e1e50 into voxpupuli:master Jan 6, 2014
@3flex 3flex deleted the validate-location-priority branch January 6, 2014 15:21
cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this pull request Oct 23, 2017
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.

2 participants