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년 전1273회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠