Browse Source

Merge pull request #13 from abpframework/gterdem/https_enhancement

Added https enforcement
pull/15/head
Enis Necipoglu 5 years ago
committed by GitHub
parent
commit
908d58a779
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbpAuthServerModule.cs
  2. 6
      apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs
  3. 2
      apps/public-web/src/EShopOnAbp.PublicWeb/appsettings.json

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

@ -113,6 +113,12 @@ namespace EShopOnAbp.AuthServer
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
app.Use((ctx, next) =>
{
ctx.Request.Scheme = "https";
return next();
});
if (env.IsDevelopment())
{

6
apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbpPublicWebModule.cs

@ -121,6 +121,12 @@ namespace EShopOnAbp.PublicWeb
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
app.Use((ctx, next) =>
{
ctx.Request.Scheme = "https";
return next();
});
if (env.IsDevelopment())
{

2
apps/public-web/src/EShopOnAbp.PublicWeb/appsettings.json

@ -41,4 +41,4 @@
"ClientId": "EShopOnAbp_PublicWeb",
"ClientSecret": "1q2w3e*"
}
}
}
Loading…
Cancel
Save