Provide us with the following info:
- ABP Framework version: v7.3.2
- UI Type: Angular
- Database System: MongoDB
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
- Exception message and full stack trace: "https for all urls required. Also for urls received by discovery. Every url in discovery document has to start with the issuer url.Also see property strictDiscoveryDocumentValidation."
- Steps to reproduce the issue:
I am using nginx to host api, authentication and angular within https but when I go to the angular website, I am getting the error message: https for all urls required. Also for urls received by discovery. Every url in discovery document has to start with the issuer url.Also see property strictDiscoveryDocumentValidation.
However, when I go to url https://xxx.well-known/openid-configuration some endpoints are show with http. My expectation is they should https.
How do I fix my issue?
8 Answer(s)
-
0
Hello vu.dh@veek.vn,
Please add this block of code to
**HttpApiHostModule.cs
inpublic override void OnApplicationInitialization(ApplicationInitializationContext context)
app.Use((ctx, next) => { ctx.Request.Scheme = "https"; return next(); });
let me know if this helps you.
Thanks, Anjali
-
0
Hello vu.dh@veek.vn,
Please add this block of code to
**HttpApiHostModule.cs
inpublic override void OnApplicationInitialization(ApplicationInitializationContext context)
app.Use((ctx, next) => { ctx.Request.Scheme = "https"; return next(); });
let me know if this helps you.
Thanks, Anjali
Hi Anjali, I did it but the problem is still existing.
-
0
Hello vu.dh@veek.vn,
Can you please add the previous code in
**AuthServerModule.cs
file and check again?Please do let me know if anything else is needed.
Thanks, Anjali
-
0
AuthServerModule
I did it but the issue is still existing.
-
0
Hello vu.dh@veek.vn,
Please try this,
app.Use((ctx, next) => { ctx.Request.Scheme = "https"; return next(ctx); });
This code needs to be added in "
public override void OnApplicationInitialization(ApplicationInitializationContext context)
" in this file -**AuthServerModule.cs
Please do let me know if this solution works.
Thanks, Anjali
-
1
Hello vu.dh@veek.vn,
Please try this,
app.Use((ctx, next) => { ctx.Request.Scheme = "https"; return next(ctx); });
This code needs to be added in "
public override void OnApplicationInitialization(ApplicationInitializationContext context)
" in this file -**AuthServerModule.cs
Please do let me know if this solution works.
Thanks, Anjali
The issue relates to Nginx configure, I fixed it, thanks for your support.
-
0
Hello vu.dh@veek.vn,
Hope you doing well.
Can we close this ticket if your query is resolved? Please confirm.
Awaiting for your valuable response.
Thank You, Anjali
-
0
Hello vu.dh@veek.vn,
Closing the ticket as mentioned above issue is resolved.
Thank you, Anjali