Browse Source

Edited/Removed files

pull/737/head
rafsanulhasan 6 years ago
parent
commit
206be058e5
15 changed files with 16 additions and 83 deletions
  1. BIN
      Certificates/DotNet Foundation CA.pfx
  2. BIN
      Certificates/eShopOnContainers.pfx
  3. BIN
      src/Services/Identity/Identity.API/Certificates/DotNet Foundation CA.pfx
  4. BIN
      src/Services/Identity/Identity.API/Certificates/eShopOnContainers.pfx
  5. +0
    -2
      src/Services/Identity/Identity.API/Dockerfile
  6. +1
    -13
      src/Services/Identity/Identity.API/Startup.cs
  7. +2
    -2
      src/Services/Identity/Identity.API/appsettings.json
  8. BIN
      src/Web/WebMVC/Certificates/DotNet Foundation CA.pfx
  9. BIN
      src/Web/WebMVC/Certificates/eShopOnContainers.pfx
  10. +0
    -2
      src/Web/WebMVC/Dockerfile
  11. +3
    -31
      src/Web/WebMVC/Startup.cs
  12. +3
    -11
      src/Web/WebMVC/appsettings.json
  13. +0
    -2
      src/Web/WebSPA/Dockerfile
  14. +5
    -18
      src/Web/WebSPA/Startup.cs
  15. +2
    -2
      src/Web/WebSPA/appsettings.json

BIN
Certificates/DotNet Foundation CA.pfx View File


BIN
Certificates/eShopOnContainers.pfx View File


BIN
src/Services/Identity/Identity.API/Certificates/DotNet Foundation CA.pfx View File


BIN
src/Services/Identity/Identity.API/Certificates/eShopOnContainers.pfx View File


+ 0
- 2
src/Services/Identity/Identity.API/Dockerfile View File

@ -2,7 +2,6 @@ ARG NODE_IMAGE=node:8.11
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM microsoft/dotnet:2.1-sdk as dotnet-build
WORKDIR /src
@ -17,7 +16,6 @@ FROM dotnet-build as build
WORKDIR /src/src/Services/Identity/Identity.API/wwwroot
COPY --from=node-build /web/wwwroot .
WORKDIR /src
COPY ./Certificates/eShopOnContainers.pfx /root/.aspnet/https/
COPY . .
WORKDIR /src/src/Services/Identity/Identity.API
RUN dotnet restore -nowarn:msb3202,nu1503


+ 1
- 13
src/Services/Identity/Identity.API/Startup.cs View File

@ -35,16 +35,7 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
services.Configure<AppSettings>(Configuration);
services.AddMvc(opts =>
{
opts.SslPort = 4105;
opts.RequireHttpsPermanent = true;
});
services.AddHttpsRedirection(opts =>
{
opts.HttpsPort = 4105;
});
services.AddMvc();
if (Configuration.GetValue<string>("IsClusterEnv") == bool.TrueString)
{
@ -119,11 +110,8 @@ namespace Microsoft.eShopOnContainers.Services.Identity.API
else
{
app.UseExceptionHandler("/Home/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
var pathBase = Configuration["PATH_BASE"];
if (!string.IsNullOrEmpty(pathBase))
{


+ 2
- 2
src/Services/Identity/Identity.API/appsettings.json View File

@ -2,8 +2,8 @@
"ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word;",
"IsClusterEnv": "False",
"MvcClient": "https://localhost:4100",
"SpaClient": "https://localhost:4104",
"XamarinCallback": "https://localhost:4105/xamarincallback",
"SpaClient": "http://localhost:5104",
"XamarinCallback": "http://localhost:5105/xamarincallback",
"UseCustomizationData": false,
"Logging": {
"IncludeScopes": false,


BIN
src/Web/WebMVC/Certificates/DotNet Foundation CA.pfx View File


BIN
src/Web/WebMVC/Certificates/eShopOnContainers.pfx View File


+ 0
- 2
src/Web/WebMVC/Dockerfile View File

@ -2,7 +2,6 @@ ARG NODE_IMAGE=node:8.11
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM microsoft/dotnet:2.1-sdk as dotnet-build
WORKDIR /src
@ -17,7 +16,6 @@ FROM dotnet-build as build
WORKDIR /src/src/Web/WebMVC/wwwroot
COPY --from=node-build /web/wwwroot .
WORKDIR /src
COPY ./Certificates/eShopOnContainers.pfx /root/.aspnet/https/
COPY . .
WORKDIR /src/src/Web/WebMVC
RUN dotnet restore -nowarn:msb3202,nu1503


+ 3
- 31
src/Web/WebMVC/Startup.cs View File

@ -1,23 +1,5 @@
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.ApplicationInsights.ServiceFabric;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.eShopOnContainers.WebMVC.Services;
using Microsoft.eShopOnContainers.WebMVC.Services;
using Microsoft.eShopOnContainers.WebMVC.ViewModels;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.HealthChecks;
using Microsoft.Extensions.Logging;
using Polly;
using Polly.Extensions.Http;
using StackExchange.Redis;
using System;
using System.IdentityModel.Tokens.Jwt;
using System.Net.Http;
using WebMVC.Infrastructure;
using WebMVC.Infrastructure.Middlewares;
using WebMVC.Services;
@ -41,10 +23,6 @@ namespace Microsoft.eShopOnContainers.WebMVC
opts.CheckConsentNeeded = context => true;
opts.MinimumSameSitePolicy = SameSiteMode.None;
});
services.AddHttpsRedirection(opts=>
{
opts.HttpsPort = 4100;
});
services.AddAppInsight(Configuration)
.AddHealthChecks(Configuration)
.AddCustomMvc(Configuration)
@ -68,7 +46,6 @@ namespace Microsoft.eShopOnContainers.WebMVC
else
{
app.UseExceptionHandler("/Error");
app.UseHsts();
}
var pathBase = Configuration["PATH_BASE"];
@ -77,8 +54,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'");
app.UsePathBase(pathBase);
}
app.UseHttpsRedirection();
app.UseCookiePolicy();
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
@ -161,11 +137,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
services.AddOptions();
services.Configure<AppSettings>(configuration);
services.AddMvc(opts=>
{
opts.SslPort = 4100;
opts.RequireHttpsPermanent = true;
});
services.AddMvc();
services.AddSession();


+ 3
- 11
src/Web/WebMVC/appsettings.json View File

@ -3,8 +3,8 @@
"OrderingUrl": "http://localhost:5102",
"BasketUrl": "http://localhost:5103",
"MarketingUrl": "http://localhost:5110",
"IdentityUrl": "https://localhost:4105",
"CallBackUrl": "https://localhost:4100/",
"IdentityUrl": "http://localhost:5105",
"CallBackUrl": "http://localhost:5100/",
"LocationsUrl": "http://localhost:5109/",
"IsClusterEnv": "False",
"UseResilientHttp": "True",
@ -23,14 +23,6 @@
"InstrumentationKey": ""
},
"HttpClientRetryCount": 8,
"HttpClientExceptionsAllowedBeforeBreaking": 7,
"Kestrel": {
"Certificates": {
"Default": {
"Path": "./Certificates/eShopOnContainers.pfx",
"Password": "D0tNet@"
}
}
}
"HttpClientExceptionsAllowedBeforeBreaking": 7
}

+ 0
- 2
src/Web/WebSPA/Dockerfile View File

@ -2,7 +2,6 @@ ARG NODE_IMAGE=node:8.11
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM microsoft/dotnet:2.1-sdk as dotnet-build
WORKDIR /src
@ -17,7 +16,6 @@ FROM dotnet-build as publish
WORKDIR /src/src/Web/WebSPA/wwwroot
COPY --from=node-build /web/wwwroot .
WORKDIR /src
COPY ./Certificates/eShopOnContainers.pfx /root/.aspnet/https/
COPY . .
WORKDIR /src/src/Web/WebSPA
RUN dotnet publish -c Release -o /app


+ 5
- 18
src/Web/WebSPA/Startup.cs View File

@ -57,20 +57,11 @@ namespace eShopConContainers.WebSPA
services.AddAntiforgery(options => options.HeaderName = "X-XSRF-TOKEN");
services
.AddMvc(opts =>
.AddMvc()
.AddJsonOptions(options =>
{
opts.SslPort = 4104;
opts.RequireHttpsPermanent = true;
})
.AddJsonOptions(options =>
{
options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
});
services.AddHttpsRedirection(opts =>
{
opts.HttpsPort = 4104;
});
options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
});
}
@ -85,12 +76,8 @@ namespace eShopConContainers.WebSPA
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseCookiePolicy();
// Configure XSRF middleware, This pattern is for SPA style applications where XSRF token is added on Index page
// load and passed back token on every subsequent async request


+ 2
- 2
src/Web/WebSPA/appsettings.json View File

@ -1,7 +1,7 @@
{
"IdentityUrl": "https://localhost:4105",
"IdentityUrl": "http://localhost:5105",
"MarketingUrl": "http://localhost:5110",
"CallBackUrl": "https://localhost:4104/",
"CallBackUrl": "http://localhost:4104/",
"PurchaseUrl": "http://localhost:5200",
"UseCustomizationData": true,
"IsClusterEnv": "False",


Loading…
Cancel
Save