Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-2288

Ignore line breaks inside of predicate and handlers for better readability

XMLWordPrintable

      Putting line breaks inside of a predicate or handler causes a parsing exception, but the ability to use this could be very handy.

      For a real example, I have a scenario where allowing every single IP range for all possible Github Action servers requires specifying 3,339 separate CIDRs.  

      This is the required syntax:

      ip-access-control( default-allow=false, acl={ '4.148.0.0/16 allow', '4.149.0.0/18 allow', '4.149.64.0/19 allow', '4.149.96.0/19 allow', '4.149.128.0/17 allow', '4.150.0.0/18 allow', '4.150.64.0/18 allow', '4.150.128.0/18 allow', '4.150.192.0/19 allow', '4.150.224.0/19 allow' ... etc ...  } ) 

      but it would be many times better to be allowed to specify the language like so:

      ip-access-control(
          default-allow=false,
          acl={
              '4.148.0.0/16 allow',
              '4.149.0.0/18 allow',
              '4.149.64.0/19 allow',
              '4.149.96.0/19 allow',
              '4.149.128.0/17 allow',
              '4.150.0.0/18 allow',
              '4.150.64.0/18 allow',
              '4.150.128.0/18 allow',
              '4.150.192.0/19 allow',
              '4.150.224.0/19 allow'
              ... etc ...
          }
      )

      and have the parser simply ignore the line breaks while inside the handler arguments.

       

              rhn-cservice-bbaranow Bartosz Baranowski
              bdw429s Brad Wood
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: