Code cleanup

This commit is contained in:
Steve Smith
2020-07-28 16:12:50 -04:00
60 changed files with 273 additions and 277 deletions

View File

@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Text;
using AutoMapper;
using BlazorShared.Authorization;
using MediatR;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
@@ -25,6 +26,8 @@ namespace Microsoft.eShopWeb.PublicApi
public class Startup
{
private const string CORS_POLICY = "CorsPolicy";
public static bool InDocker => Environment.GetEnvironmentVariable("DOTNET_RUNNING_IN_CONTAINER") == "true";
public Startup(IConfiguration configuration)
{
Configuration = configuration;
@@ -114,8 +117,7 @@ namespace Microsoft.eShopWeb.PublicApi
{
builder.WithOrigins("http://localhost:44319",
"https://localhost:44319",
"http://localhost:44315",
"https://localhost:44315");
Constants.GetOriginWebUrl(InDocker));
builder.AllowAnyMethod();
builder.AllowAnyHeader();
});