Search code examples
javatomcattomcat8

Make changes to in Tomcat 8.5.4 source code


I need to load resources with an Ajax POST request from a local file. However Tomcat doesn't accept requests with Origin: file:// headers, not even when I disable cors filters.

This bug has been reporter and will be fixed on Tomcat 8.5.5 and onwards. In the meantime would it be possible for me to make some changes in the source code of Tomcat 8.5.4 as a temporary fix. I saw on the github commit that I just have to add a few lines of Java code, but I don't know how. Or would it be possible to run 8.5.5 before the official release? How am I supposed to do that?

Edit: Link to bug: http://tomcat.10.x6.nabble.com/Bug-60008-New-Tomcat-CORS-filter-not-allowing-origin-with-file-when-resource-access-done-from-WebView-td5054019.html


Solution

  • Tomcat 8.5.5 got released today: http://tomcat.apache.org/download-80.cgi