sunpengfei
2025-06-10 c16fb1bb2431f40eb4b8e1af13c5254e2cf41d5a
LifePayment/LifePayment.Host/LifePaymentServiceHostModule.cs
@@ -170,13 +170,18 @@
            app.UseIdentityServer();
            app.UseAuthorization();
            app.UseAbpClaimsMap();
#if DEBUG
            app.UseSwagger();
            app.UseSwaggerUI(options =>
            var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
            var openSwagger = configuration["OpenSwagger"].ToBoolOrNull();
            if (openSwagger == true)
            {
                options.SwaggerEndpoint("/swagger/v1/swagger.json", "LifePayment Service API");
            });
#endif
                app.UseSwagger();
                app.UseSwaggerUI(options =>
                {
                    options.SwaggerEndpoint("/swagger/v1/swagger.json", "LifePayment Service API");
                });
            }
            app.UseAuditing();
            app.UseConfiguredEndpoints();
            AsyncHelper.RunSync(async () =>