fix dataservice

This commit is contained in:
hydrant
2019-09-22 18:52:15 +02:00
parent fd3b9b9ebc
commit e70a33d822

View File

@@ -42,6 +42,8 @@ namespace ReallifeGamemode.DataService
services.AddDbContext<DatabaseContext>(); services.AddDbContext<DatabaseContext>();
services.AddCors();
services.AddLogic(); services.AddLogic();
services services
@@ -129,6 +131,13 @@ namespace ReallifeGamemode.DataService
app.UseDeveloperExceptionPage(); app.UseDeveloperExceptionPage();
} }
app.UseCors(c =>
{
c.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader();
});
app.UseSwaggerUI(c => app.UseSwaggerUI(c =>
{ {
c.RoutePrefix = "doc"; c.RoutePrefix = "doc";