这边前端call本地部署的azure function出现了跨域问题,搜索一下解决方案
直接修改local.setting.json,在其中添加CORS配置为通配符”*”,就行了
local.settings.json
{
"IsEncrypted": false,
"Values": {
"PYTHON_ENABLE_INIT_INDEXING": "1",
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_EXTENSION_VERSION":"4.34.1",
"FUNCTIONS_WORKER_RUNTIME": "python"
},
"Host": {
"CORS": "*"
}
}