Browse Source

Unnecessary using was removed. (#774)

main
Bulat Almukhametov 3 years ago
committed by GitHub
parent
commit
a787c8bb52
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/PublicApi/Program.cs

9
src/PublicApi/Program.cs

@ -6,7 +6,6 @@ using BlazorShared.Models;
using MediatR;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.eShopWeb;
using Microsoft.eShopWeb.ApplicationCore.Constants;
@ -75,11 +74,11 @@ const string CORS_POLICY = "CorsPolicy";
builder.Services.AddCors(options =>
{
options.AddPolicy(name: CORS_POLICY,
builder =>
corsPolicyBuilder =>
{
builder.WithOrigins(baseUrlConfig.WebBase.Replace("host.docker.internal", "localhost").TrimEnd('/'));
builder.AllowAnyMethod();
builder.AllowAnyHeader();
corsPolicyBuilder.WithOrigins(baseUrlConfig.WebBase.Replace("host.docker.internal", "localhost").TrimEnd('/'));
corsPolicyBuilder.AllowAnyMethod();
corsPolicyBuilder.AllowAnyHeader();
});
});

Loading…
Cancel
Save