// Startup.cs
public void ConfigureServices(IServiceCollection services)
{
services.AddCors(options =>
{
options
.AddPolicy("CorsPolicy", builder => builder
.WithOrigins("http://localhost:4200")
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials());
});
}
}
public void Configure(IApplicationBuilder app, IApiVersionDescriptionProvider provider)
{
app.UseCors("CorsPolicy");
}
Remove from git tracking
git rm --cached <file>
git rm --cached <directory> -r
git rm --cached ./ -r
basic angular requirements
// global req.
npm i -g @angular/cli