此链接:“http://new%20behavior%20and%20include%20it%20in%20the%20enpoint%20configuration”
说:
“您必须有新的行为并将其包含在端点配置中”
在 web.config 中添加 customHeaders 来为 WCF 服务启用 CORS 还不够,例如:
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
<add name="Access-Control-Allow-Headers" value="content-type, x-requested-with, Accept />
...
如果不够,为什么?