'ASP.NET Core API Swagger behind EnvoyProxy swagger.json not found

New to envoy proxy, i have a simple ASP.Net Core API with openapi/swagger and its containerized. There is envoy proxy that is calling the controller which works perfectly. But when swagger ui is being access from envoy proxy swagger.json is not found:

enter image description here

envoy config is:

enter image description here



Solution 1:[1]

You must set external url into swagger config:

app.UseSwaggerUI(c =>
{
  c.SwaggerEndpoint("/application/swagger/v1/swagger.json", "v1 Docs");
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 bruegth