Starts in:
2 DAYS
1 HR
59 MIN
52 SEC
Starts in:
2 D
1 H
59 M
52 S
Open Closed

I not get my proxy URl in open-configuration #3731


User avatar
0
vipulbuoyancy created

Hello Sir,

I configure appsettings.json file authority url is : proxy_url .

I not get proxy url in open-configuration response is :

can you please help me to configure the correct proxy url?

Thanks


10 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi Is this work for you?

    https://github.com/IdentityServer/IdentityServer4/issues/3309

  • User Avatar
    0
    vipulbuoyancy created

    Hi

    this did not solve my issue

    thanks

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Your auth server is behind the proxy server, right?

    The IdentityServer4 document mentioned this: https://identityserver4.readthedocs.io/en/aspnetcore1/topics/deployment.html

    The solution is to use the ForwardedHeaders middleware and there is the document for this: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/proxy-load-balancer?view=aspnetcore-6.0

  • User Avatar
    0
    vipulbuoyancy created

    Hi liangshiwei,

    Thanks for your suggestions. I went through the links and tried to implement the same but I am still facing the issue.

    Though I am able to sort out the issue in swagger. Now from swagger I am able to Authenticate & execute the apis with proxy URL.

    But from the application I am not getting the proper response from the .well-known/openid-configuration api.

    It is returning actual url instead of proxy url. I might be missing some configuration but not getting the exact idea.

    Please help me to figure out it.

    Thank you.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Ok, I hope I can help you solve the problem quickly.

    Could you provide the full steps to reproduce? thanks.

  • User Avatar
    0
    vipulbuoyancy created

    Hi liangshiwei,

    I added proxy in nginx server

    appSettings.json on IIS server

    I configure OnApplicationInitialization

    var forwardOptions = new ForwardedHeadersOptions
    {
        ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto,
        RequireHeaderSymmetry = false,
    };
    forwardOptions.KnownNetworks.Clear();
    forwardOptions.KnownProxies.Clear();
    app.UseForwardedHeaders(forwardOptions);
    

    Thank you

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Sorry, but what version are you using?

    please include followings:

    • ABP Framework version: vX.X.X
    • UI type: Angular / MVC / Blazor
    • DB provider: EF Core / MongoDB
    • Tiered (MVC) or Identity Server Separated (Angular): yes / no
    • Steps to reproduce the issue:"
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Could you try this to check if it works?

    Add to your auth server module class.

    app.Use(async (ctx, next) =>
    {
        var configuration = ctx.RequestServices.GetRequiredService<IConfiguration>();
        ctx.SetIdentityServerOrigin(configuration["App:SelfUrl"]);
        await next();
    });
    

  • User Avatar
    0
    vipulbuoyancy created

    Hi

    ABP Framework version: v5.2.2

    UI type: Angular

    DB provider: EF Core

    Tiered (MVC) or Identity Server Separated (Angular): no

    Thanks

  • User Avatar
    0
    vipulbuoyancy created

    Hi liangshiwei,

    app.Use(async (ctx, next) => { var configuration = ctx.RequestServices.GetRequiredService(); ctx.SetIdentityServerOrigin(configuration["App:SelfUrl"]); await next(); });

    After adding this code working fine.

    Thank you

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06