Cors 跨域Access-Control-Allow-Origin

时间:2021-05-16 03:49:09

1.Access-Control-Allow-Origin 指定格式

The Origin header field has the following syntax:

origin              = "Origin:" OWS origin-list-or-null OWS
origin-list-or-null = %x6E %x75 %x6C %x6C / origin-list
origin-list = serialized-origin *( SP serialized-origin )
serialized-origin = scheme "://" host [ ":" port ]
; <scheme>, <host>, <port> from RFC
origin              = "Origin:" OWS origin-list-or-null OWS
origin-list-or-null = %x6E %x75 %x6C %x6C / origin-list
origin-list = serialized-origin *( SP serialized-origin )
serialized-origin = scheme "://" host [ ":" port ]

更多:

Asp.Net WebApi 启用CORS跨域访问指定多个域名

Asp.Net WebApi+Microsoft.AspNet.Cors 启用CORS跨域访问

相关资料:http://tools.ietf.org/html/rfc6454#section-7.1

https://code.msdn.microsoft.com/Cross-Origin-resource-192e7b8c/sourcecode?fileId=79100&pathId=905269383