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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン