Created
November 20, 2016 12:13
-
-
Save pantaluna/8cfda856735e7c363cad01e9b7e5712f to your computer and use it in GitHub Desktop.
Apache modsecurity_crs_10_setup.conf - Add HTTP/2.0 to the list of allowed http versions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ***SPECIAL*** Add HTTP/2.0 to the list of allowed http versions | |
# Fixes the modsecurity error [id "960034"] [rev "2"] [msg "HTTP protocol version is not allowed by policy"] [data "HTTP/2.0"] | |
MYSCRIPT="/usr/share/modsecurity-crs/modsecurity_crs_10_setup.conf" | |
SEARCHTHIS="'tx.allowed_http_versions=HTTP/0.9 HTTP/1.0 HTTP/1.1'" | |
REPLACEWITH="'tx.allowed_http_versions=HTTP/0.9 HTTP/1.0 HTTP/1.1 HTTP/2.0'" | |
sed --in-place "s#${SEARCHTHIS}#${REPLACEWITH}#" ${MYSCRIPT} | |
grep --ignore-case "${REPLACEWITH}" ${MYSCRIPT} || echo "ERROR: the text has NOT been REPLACED!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment