added cors and added produces json.

This commit is contained in:
David Lebee
2021-02-07 00:12:41 -05:00
parent 5df2fa99ce
commit cf2450f5f7
3 changed files with 6 additions and 0 deletions
+3
View File
@@ -74,6 +74,7 @@ namespace Demo
services.AddPoweredSoftGraphQLFluentValidation();
services.AddSwaggerGen();
services.AddCors();
}
private void AddDynamicQueries(IServiceCollection services)
@@ -113,6 +114,8 @@ namespace Demo
app.UseHttpsRedirection();
app.UseCors(o => o.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod());
app.UseRouting();
app.UseAuthorization();