Closed XiGuaZhenHaoChi closed 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.
I think I found the reason
Hello, I found the following error while running Tye and opening WebPublicGateway Swagger
page https://localhost:44373/ show error
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