Also, we didn't manage to add app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedFor });, if we add this to Programs it fails compilation.
Also, trying to access https://dev-configurator-api.mtgcorp.com/.well-known/openid-configuration gives us this:
error "invalid_request" error_description "This server only accepts HTTPS requests."
If I fix that using RequireHttpsMetadata=false, we're back to square one with the original error
After applying these changes we get the following error: Object { headers: {…}, status: 400, statusText: "Bad Request", url: "https://dev-configurator-api.mtgcorp.com/.well-known/openid-configuration", ok: false, type: undefined, redirected: undefined, name: "HttpErrorResponse", message: "Http failure response for https://dev-configurator-api.mtgcorp.com/.well-known/openid-configuration: 400 Bad Request", error: {…} }
Hello,
We've been trying to install an instance of this solution, based on the MTGCorp.HttpApi.Host solution, version . We're trying to use a fritn that connects to it using the following versions:
"versions": { "LeptonX": "4.1.0", "AbpFramework": "9.1.0", "AbpCommercial": "9.1.0", "AbpStudio": "0.9.25", "TargetDotnetFramework": "net9.0" },
We've managed to run this in a docker inside an app service. The app service has the requirement that all internal traffic should be http.
Our appsettings is as follows: { "App": { "SelfUrl": "https://dev-configurator-api.mtgcorp.com", "AngularUrl": "http://localhost:4200", "CorsOrigins": "https://.MTGCorp.com,http://localhost:4200", "RedirectAllowedUrls": "http://localhost:4200", "DisablePII": false, "HealthCheckUrl": "/health-status" }, "ConnectionStrings": { "Default": "", "ToothProduct": "" }, "AuthServer": { "Authority": "https://dev-configurator-api.mtgcorp.com", "RequireHttpsMetadata": false, "SwaggerClientId": "MTGCorp_Swagger", "CertificatePassPhrase": "" }, "Kestrel": { "Endpoints": { "Http": { "Url": "http://:80" } } }, "StringEncryption": { "DefaultPassPhrase": "" }, "mtg": { "BaseUrl": "https://mtgcorp.com/", "UserName": "admin", "Pass": "mtg.2022._" }, "Localization": { "DefaultPassword": "***" }, "RemoteServices": { "Default": { "BaseUrl": "https://localhost:53929/" }, "BookStore": { "BaseUrl": "https://localhost:48392/" } } }
When we try to access through a redirect from the front, we get the error message "error validating authorization_endpoint in discovery document Array [ "https for all urls required. Also for urls received by discovery." ]": error validating authorization_endpoint in discovery document Array [ "https for all urls required. Also for urls received by discovery." ] angular-oauth2-oidc.mjs:1349:19 Angular 2 validateDiscoveryDocument loadDiscoveryDocument RxJS 15 next _next next map _next next filter _next next doInnerSub _next next innerSubscriber _next next Angular 21 onLoad invokeTask onInvokeTask invokeTask onInvokeTask invokeTask runTask invokeTask invokeTask globalCallback globalZoneAwareCallback (Asíncrono: EventListener.handleEvent) customScheduleGlobal scheduleTask onScheduleTask scheduleTask onScheduleTask scheduleTask scheduleTask scheduleEventTask makeAddListener handle RxJS 57 _trySubscribe subscribe errorContext subscribe switchMap _next next fromArrayLike _trySubscribe subscribe errorContext subscribe switchMap operate subscribe errorContext subscribe finalize operate subscribe errorContext subscribe finalize operate subscribe errorContext subscribe finalize operate subscribe errorContext subscribe doInnerSub outerNext _next next fromArrayLike _trySubscribe subscribe errorContext subscribe mergeInternals mergeMap operate subscribe errorContext subscribe filter operate subscribe errorContext subscribe map operate subscribe errorContext subscribe Angular 3 loadDiscoveryDocument ZoneAwarePromise loadDiscoveryDocument init abp-ng.oauth.mjs:296 __async main.js:60 ZoneAwarePromise Angular __async main.js:44 init abp-ng.oauth.mjs:288 init abp-ng.oauth.mjs:348 __async main.js:60 ZoneAwarePromise Angular __async main.js:44 init abp-ng.oauth.mjs:345 init/</result$< abp-ng.oauth.mjs:504 RxJS 60 ZoneAwarePromise Angular lastValueFrom RxJS init abp-ng.oauth.mjs:505 __async main.js:60 ZoneAwarePromise Angular __async main.js:44 init abp-ng.oauth.mjs:500 getInitialData abp-ng.core.mjs:1209 fulfilled main.js:47 Angular 15 invoke onInvoke invoke run scheduleResolveOrReject invokeTask onInvokeTask invokeTask onInvokeTask invokeTask runTask drainMicroTaskQueue (Asíncrono: promise callback) nativeScheduleMicroTask scheduleMicroTask scheduleTask
We'd liek to resolve this issue. Should we modify the appsettings in some way? What should we put as values of App.AngularUrl, App.CorsOrigins, App.RedirectAllowedUrls, RemoteServices.Default.BaseUrl and RemoteServices.BookStore.BaseUrl? IS the solution something else?
Hello,
We've been trying to install an instance of this solution, based on the MTGCorp.HttpApi.Host solution, version . We're trying to create a docker image using the following versions:
"versions": { "LeptonX": "4.1.0", "AbpFramework": "9.1.0", "AbpCommercial": "9.1.0", "AbpStudio": "0.9.25", "TargetDotnetFramework": "net9.0" },
We've managed to create an image locally, but when trying to deploy this same docker image into an Azure App Service we're running into problems, the Azure App Service expects an internal port 80 and the standard solution uses only https ports.
Because of this, we understand that the azure app service refuses to consider the docker as running correctly and does not provide connectivity to it.
We have tried to change the app to use http, but we end up in a situation where, when accessing the address https://apiaddress/.well-known/openid-configuration, this gives us the error that we cannot use http and we must use https. Without this link working our app does not work.
We would like to run the app as a docker inside an app service, is that possible without major refactoring?
We're happy to provide config files as necessary.
We've tried to follow different guides regarding set up of certificates and we have a wildcart certificate for the https, but still it doesn't work. The guides referencing app services expect to deploy code, and we do not want that since it's more costly and unstable in general, we'd like to use dockers only.
Do you have some solution/guide for this? Should we move away from app services and try a kubernetes cluster instead?
We'll wait for your input.