Browse Source

Update Authserver

pull/20/head
Başak ERDEM 5 years ago
parent
commit
3a5c6a872c
  1. 7
      apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj
  2. 15
      apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs
  3. 5
      apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj
  4. 8
      etc/k8s/eshoponabp/charts/authserver/values.yaml

7
apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj

@ -30,4 +30,11 @@
<ProjectReference Include="..\..\..\..\services\saas\src\EShopOnAbp.SaasService.EntityFrameworkCore\EShopOnAbp.SaasService.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
</Project>

15
apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs

@ -12,6 +12,8 @@ using StackExchange.Redis;
using System;
using System.IO;
using System.Linq;
using IdentityServer4.Extensions;
using Microsoft.Extensions.Configuration;
using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.Account.Web;
@ -47,6 +49,7 @@ namespace EShopOnAbp.AuthServer
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true;
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
@ -114,10 +117,16 @@ namespace EShopOnAbp.AuthServer
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
app.Use((ctx, next) =>
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
app.Use(async (ctx, next) =>
{
ctx.Request.Scheme = "https";
return next();
if (ctx.Request.Headers.ContainsKey("from-ingress"))
{
ctx.SetIdentityServerOrigin(configuration["App:SelfUrl"]);
}
await next();
});
if (env.IsDevelopment())

5
apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj

@ -43,7 +43,10 @@
</ItemGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="Pages\Products\Index.cshtml" />
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
</Project>

8
etc/k8s/eshoponabp/charts/authserver/values.yaml

@ -0,0 +1,8 @@
env:
- name: "App__SelfUrl"
value: "https://eshoponabp-authserver"
- name: "App__CorsOrigins"
value: "https://localhost:44371,https://localhost:44372,https://eshoponabp-public-webgateway"
- name: "App__RedirectAllowedUrls"
value: "http://localhost:4200,https://localhost:44307"
Loading…
Cancel
Save