nginxinc / crossplane

Quick and reliable way to convert NGINX configurations into JSON and back.
Apache License 2.0
719 stars 87 forks source link

Parse error on limit_req_zone with sync parameter #78

Closed mbibaud closed 4 years ago

mbibaud commented 4 years ago

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

Additional context The following PR appears to fix the error and support both 3 and 4 parameters : https://github.com/nginxinc/crossplane/pull/77

framer777 commented 4 years ago

https://github.com/nginxinc/crossplane/pull/77 merged