Azure cloud - Container App - 403 Forbidden problem

286 Views Asked by At

I'm learning Azure and trying to simulate a simple microservices environment.

I have 3 applications (A, B, C) running in Azure as Azure container apps. 2 of them are Java applications (A, B) as backend, and the third application C is written in React. Application C only communicates with application B, which only communicates with application A. All applications have ingress enabled, ingress traffic set to "accepting traffic from anywhere", "Allow all traffic" and "Insecure connections" set to true.

When testing applications A, B and C with an HTTP client, they work properly. When calling an endpoint from A, application B also receives the response and returns it. However, when trying to call application B from the frontend application, I keep getting a 403 error and the request does not reach application B. What is the problem?

Addresses are checked and ok, All headers are ok, there is no security in app B CORS settings are also set, and this was problem before and it's fixed

enter image description hereenter image description hereenter image description hereenter image description here

Please help, how to fix this?

1

There are 1 best solutions below

0
Vinicius Deschamps On

Based on what've read, it seems that your issue is related when one of the application tries to access another application, also the image you've shared has the following error

"strict-origin-when-cross-origin"

And this is related to CORS configuration, and even thought you mentioned that it's already configured, can you please double check to ensure and also instead of setting the addresses, add a * for testing purposes

  1. Go to your Container App in the Azure Portal, under the settings menu, select CORS and enable, by checking the checkbox that says Access-Control-Allow-Credentials

cors-step1

  1. Now, at the Allowed Origins add the *

  2. Give another shot and let us know how did go

Source