Change this to 

```c#
map.UseCors(CorsOptions.AllowAll);
```