abpframework / eShopOnAbp

Reference microservice solution built with the ABP Framework and .NET, runs on Kubernetes with Helm configuration, includes API Gateways, Angular and ASP.NET Core MVC applications, PostgreSQL and MongoDB databases
https://www.eShopOnAbp.com/
MIT License
664 stars 259 forks source link

WebPublicGateway Error #257

Closed XiGuaZhenHaoChi closed 2 weeks ago

XiGuaZhenHaoChi commented 2 weeks ago

Hello, I found the following error while running Tye and opening WebPublicGateway Swagger

page https://localhost:44373/ show error

Fetch error
Failed to fetch http://administrationService/swagger/v1/swagger.json
Fetch error
Possible mixed-content issue? The page was loaded over https:// but a http:// URL was specified. Check that you are not attempting to load mixed content.

browser console show error requestinterceptor.js:8 Mixed Content: The page at 'https://localhost:44373/swagger/index.html' was loaded over HTTPS, but requested an insecure resource 'http://administrationservice/swagger/v1/swagger.json'. This request has been blocked; the content must be served over HTTPS.

I did not find any error in the gateway log, but I found an exception when opening the public web https://localhost:44335/ Polly.Retry.AsyncRetryEngine.ImplementationAsync<TResult>(Func<Context, CancellationToken, Task<TResult>> action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates<TResult> shouldRetryResultPredicates, Func<DelegateResult<TResult>, TimeSpan, int, Context, Task> onRetryAsync, int permittedRetryCount, IEnumerable<TimeSpan> sleepDurationsEnumerable, Func<int, DelegateResult<TResult>, Context, TimeSpan> sleepDurationProvider, bool continueOnCapturedContext) Polly.AsyncPolicy<TResult>.ExecuteAsync(Func<Context, CancellationToken, Task<TResult>> action, Context context, CancellationToken cancellationToken, bool continueOnCapturedContext) Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) Microsoft.Extensions.ServiceDiscovery.Http.ResolvingHttpDelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in ResolvingHttpDelegatingHandler.cs Microsoft.Extensions.Http.Resilience.ResilienceHandler+<>c+<<SendAsync>b__3_0>d.MoveNext()

The web-gateway swagger and angular can be accessed normally

XiGuaZhenHaoChi commented 2 weeks ago

Additionally, when I use Visual Studio to run, I encounter an error accessing Swagger using HTTP Fetch error Failed to fetch http://administrationService/swagger/v1/swagger.json Fetch error Possible cross-origin (CORS) issue? The URL origin (http://administrationservice) does not match the page (http://localhost:5073). Check the server returns the correct 'Access-Control-Allow-*' headers.

XiGuaZhenHaoChi commented 2 weeks ago

I think I found the reason image