问题描述
大家好,
我在将新的cors URL添加到我的Web应用程序时收到错误消息.单击保存"按钮后,它会在浏览器控制台中引发异常.
I get error messages, while adding new cors url to my Web-App. After click the save button it raises an exception in the browser console.
"错误:除非您指定写入"选项,否则无法将值写入ko.computed.如果您想读取当前值,请不要传递任何参数"
"Error: Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameter"
"TypeError:null不是一个对象(正在评估'a.cors().supportCredentials')"
"TypeError: null is not an object (evaluating 'a.cors().supportCredentials')"
我尝试了野生动物园,铬和ie.这是一个已知问题吗?
I tried it with safari, chrome and ie. Is that a known problem?
非常感谢您.
推荐答案
如果您的应用要求发送凭据(例如Cookie或身份验证令牌),则浏览器可能 访问权限控制允许凭证 header 在回应上.要在App Service中启用此功能,请设置 properties.cors.supportCredentials true in 您的CORS配置. allowedOrigins includes '*' .
If your app requires credentials such as cookies or authentication tokens to be sent, the browser may require the ACCESS-CONTROL-ALLOW-CREDENTIALS header on the response. To enable this in App Service, set properties.cors.supportCredentials to true in your CORS config. This cannot be enabled when allowedOrigins includes '*'.
这篇关于添加新的CORS URL时出错-Azure门户-Web App的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!