Azure Api Management

Fernando Martin Gutierrez 25 Reputation points
2023-07-05T19:03:51.6466667+00:00

Good day

I need help with a problem I'm having in Azure, specifically at the time of API Management configuration.

When I want to perform a test within one of the APIs, it throws me status code 500 error and tells me:

Referrer Directive:

strict-origin-when-cross-origin

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,266 questions
{count} votes

Accepted answer
  1. Konstantinos Passadis 19,281 Reputation points MVP
    2023-07-05T19:34:57.4566667+00:00

    Hello @Fernando Martin Gutierrez !

    This is most probably related to CORS

    https://learn.microsoft.com/en-us/azure/api-management/cors-policy

    From Google’s announcement: “strict-origin-when-cross-origin offers more privacy. With this policy, only the origin is sent in the Referer header of cross-origin requests. This prevents leaks of private data that may be accessible from other parts of the full URL such as the path and query string.”

    Have also a look in this Post

    https://stackoverflow.com/questions/67244072/how-configure-azure-api-management-for-cors

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,381 Reputation points
    2023-07-05T20:04:58.0866667+00:00

    Fernando Martin Gutierrez I quickly looked at the activity ID bf679d76-7d19-4947-b955-a7a4035a537d in our backend logs and found that the request was failed with error: BackendConnectionFailure and error message: An attempt was made to access a socket in a way forbidden by its access permissions.

    API Management instance is unable to connect to the backend URL configured which looks like an internal IP address 10.x.x.x and APIM is not deployed in VNET. If you are looking to connect to the backend service via private endpoint, note that currently, outbound connection is not supported, and you would need to use internal or external VNET for that. Checkout the doc https://learn.microsoft.com/en-us/azure/api-management/private-endpoint for more info.

    To troubleshoot the issue, you can enable diagnostic logs in APIM and review the logs for the error message, details, response code etc. and https://techcommunity.microsoft.com/t5/azure-paas-blog/troubleshooting-4xx-and-5xx-errors-with-azure-apim-services/ba-p/2115744 will help out with the instructions/scenarios.

    So, make sure the backend URL is public and accessible via APIM or follow the instructions in the doc to deploy it to external or internal VNET. I hope this helps and let me know if any questions.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.