Skip to content

Parse error on limit_req_zone with sync parameter #78

Closed
@mbibaud

Description

@mbibaud

Describe the bug
Parsing an nginx configuration having limit_req_zone directives using the sync parameter causes crossplane to report an error: invalid number of arguments in "limit_req_zone" directive in

http://nginx.org/en/docs/http/ngx_http_limit_req_module.html#limit_req_zone

To Reproduce
Steps to reproduce the behavior:

  1. Create an nginx config file with 'limit_req_zone $remote_addr zone=test_zone:10M rate=60r/s sync;'
  2. Run crossplane parse on nginx config
  3. See traceback

Expected behavior
Since sync is a valid parameter, I would not expect any errors returned.

Your environment

  • Operating System Ubuntu 18.04
  • Version of crossplane: 0.5.3)

Additional context
The following PR appears to fix the error and support both 3 and 4 parameters :
#77

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions