Skip to content

Commit a5c3408

Browse files
committed
fix #1289: allowSchemeMismatch=true for tomcat server.xml
Typically, tomcat runs behind a reverse proxy (gorouter) and TLS is terminated there. This leads to a scheme mismatch between the protocol reported in http headers and what tomcat actually sees. Due to https://bz.apache.org/bugzilla/show_bug.cgi?id=70091 http2 routes don't work anymore with tomcat 10.1.55 and 11.0.22. Fix is to configure allowSchemeMismatch='true' for UpgradeProtocol in server.xml. Requires tomcat >=10.1.56 or 11.0.23.
1 parent 5dd80ab commit a5c3408

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/java/resources/files/tomcat/conf/server.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<Service name='Catalina'>
2222
<Connector port='${http.port}' bindOnInit='false' connectionTimeout='20000' keepAliveTimeout='120000'>
23-
<UpgradeProtocol className='org.apache.coyote.http2.Http2Protocol' />
23+
<UpgradeProtocol className='org.apache.coyote.http2.Http2Protocol' allowSchemeMismatch='true'/>
2424
</Connector>
2525

2626
<Engine defaultHost='localhost' name='Catalina'>

0 commit comments

Comments
 (0)