Square brackets can be allowed in query strings using this configuration in server.xml: <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" relaxedQueryChars="[]" /> In a docker image based on the standard tomcat85 base image however, this forces us to entirely replace the base server.xml. A system property or some other means of configuring this without modifying server.xml would be very useful.
I am rejecting this because a system property will affect the entire container, not just this connector. Moreover, RFC 3986 does not allow [ or ] in a query string w/o pct-encoded because both chars are in gen-delims and not in pchar.
Maybe you can achieve the same using a PropertySource and lookup your values from environment variables. See https://tomcat.apache.org/tomcat-8.5-doc/config/systemprops.html#Property_replacements and https://tomcat.apache.org/tomcat-9.0-doc/api/org/apache/tomcat/util/digester/EnvironmentPropertySource.html for more information