Elastic Beanstalk Tomcat 8.5 Corretto 11 4.2.9: Requests blocked by CORS policy + 404 Error

0

This morning our Elastic Beanstalk environment has been automatically upgraded from Tomcat 8.5 Corretto 11 4.2.8 to Tomcat 8.5 Corretto 11 4.2.9. The application running in this environment (which is a Java Application Backend) started throwing the following error:

Access to XMLHttpRequest at 'https://backend.example.com/api/exampleservice/service?exempleparam=1000' from origin 'https://frontend.example.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

This error has never been thrown with previous minor versions of Tomcat 8.5 Correto 11 4.2 (i.e. 6,7 and 8).

In order to further investigate this issue we have disabled web security in Chrome to avoid the CORS check perfromed by the browser. Under this configuration we received a 404 HTTP error when issuing the request.

Seems like our .war application is not properly deployed in Tomcat 8.5 Correto 11 4.2.9. We would like to know if this minor version requieres specific configuration that we might be ignoring.

We had to move back the Elastick Beanstalk environment to Tomcat 8.5 Corretto 11 4.2.8. Everything worked properly with the same .war. No CORS errors, no 404 Errors.

Can anybody provide some advice? Is it a Tomcat 8.5 Corretto 11 4.2.9 problem that will be fixed by AWS or is it necessary to perform particular configuration on Elastic Beanstalk to properly manage applications using this particular application server minor version.

Thanks in advance.

已提问 2 年前1275 查看次数
1 回答
0
已接受的回答

Just to close the loop. Deploying our .war in Tomcat 8.5 Correto 11 4.2.11. works just fine. We did not make any adjustments to code or configuration. Just change from Tomcat 8.5 Correto 11 4.2.8 to Tomcat 8.5 Correto 11 4.2.11.

There has been probabily issues with Tomcat 8.5 Correto 11 4.2.9 and Tomcat 8.5 Correto 11 4.2.10 since the are not available options anymore in the Elastic Beanstalk environment.

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则