I am using the standard ASP.NET Core middleware and I would like to allow IP address ranges (in my case, I am looking for the private IP address ranges), to ease development.
Currently, my middleware looks like this:
app.UseCors(builder =>
builder.WithOrigins("http://localhost:8080", "https://test-env.com")
.AllowAnyHeader()
.AllowAnyMethod());
But now I would like to add a range of IPs, e.g. 172.16.0.0–172.31.255.255
, in CIDR notation 172.16.0.0/12
. How do I do it?
I tried the following and neither seems to work:
http://172.16.0.0/12:4200
http://172.16.*.*:4200
http://172.16.*:4200