File: //etc/modsecurity.d/owasp/regex-assembly/920100.ra
##! Please refer to the documentation at
##! https://coreruleset.org/docs/development/regex_assembly/.
##!+ i
##! Cover the CONNECT method
##! Meth |----- IPv4 Address ------|- Port -| Protocol |
^connect (?:\d{1,3}\.){3}\d{1,3}\.?(?::\d+)?\s+[\w\./]+$
##! Meth |- Host --|Prt| Protocol |
^connect [\w\-\./]+:\d+\s+[\w\./]+$
##! Cover the OPTIONS method
##! Meth |*| Protocol |
^options \*\s+[\w\./]+$
##! Cover other methods of the form METHOD [[scheme]://[host][:port]]/path[?query][#fragment] protocol
##! Method ---|- Scheme:// -|- Host --|-- Port --| Path |--- Query ---| Fragment | Protocol |
^[a-z]{3,10}\s+(?:\w{3,7}?://[\w\-\./]*(?::\d+)?)?/[^?#]*(?:\?[^#\s]*)?(?:#[\S]*)?\s+[\w\./]+$