Edited/Removed files

This commit is contained in:
rafsanulhasan 2018-09-01 17:53:32 +06:00
parent dda7d5b3e5
commit 206be058e5
15 changed files with 16 additions and 83 deletions

Binary file not shown.

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

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))
{

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,

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

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();

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
}

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

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

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",