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 年前檢視次數 1233 次
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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南