'I get 504 Gateway Time-out when call api from postman or front in ASP.NET Core 5

I get 504 Gateway Time-out when call api from postman or front. but when call api locally everything is ok.

I use :

webBuilder.UseStartup<Startup>()
          .UseKestrel(o => { o.Limits.RequestHeadersTimeout = TimeSpan.FromMinutes(10); })
          .UseKestrel(o => { o.Limits.KeepAliveTimeout = TimeSpan.FromMinutes(10); });


Sources

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

Source: Stack Overflow

Solution Source