Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I am trying to reach my ASP.NET core api running on https://localhost:5001/ from a SPA which is hosted on another domain (although same computer for me) and I get a CORS error.
Describe the solution you'd like
I would like to propose that we extend the CorsPolicy with the boolean property AllowPrivateNetworkAccess and CorsPolicyBuilder with the method WithPrivateNetworkAccess which the CorsService uses to set the Access-Control-Allow-Private-Network: true on preflight requests if the browser sends the Access-Control-Request-Private-Network: true header in the request.
Additional context
Link to WICG Draft: https://wicg.github.io/private-network-access/
Link to Chrome developer article about the feature and roll out: https://developer.chrome.com/blog/private-network-access-preflight/
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I am trying to reach my ASP.NET core api running on https://localhost:5001/ from a SPA which is hosted on another domain (although same computer for me) and I get a CORS error.
Describe the solution you'd like
I would like to propose that we extend the
CorsPolicywith the boolean propertyAllowPrivateNetworkAccessandCorsPolicyBuilderwith the methodWithPrivateNetworkAccesswhich theCorsServiceuses to set theAccess-Control-Allow-Private-Network: trueon preflight requests if the browser sends theAccess-Control-Request-Private-Network: trueheader in the request.Additional context
Link to WICG Draft: https://wicg.github.io/private-network-access/
Link to Chrome developer article about the feature and roll out: https://developer.chrome.com/blog/private-network-access-preflight/