为Azure功能本地主机配置CORS [英] Configure CORS for Azure Functions Local Host

查看:79
本文介绍了为Azure功能本地主机配置CORS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Azure Functions CLI工具在本地测试Azure Functions应用.有什么方法可以为本地主机配置CORS设置?

I'm testing an Azure Functions app locally with the Azure Functions CLI tooling. Is there any way I can configure CORS settings for the local host?

推荐答案

您可以像这样启动主机

func host start --cors *

您还可以更具体一些,并提供以逗号分隔的允许的网址列表

You can also be more specific and provide a comma delimited list of allowed urls

更多信息在这里: https://github.com/Azure/azure -webjobs-sdk-script/issues/1012

这篇关于为Azure功能本地主机配置CORS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆