Azure API Manager expose all to public, get rid of Ocp-Apim-Subscription-Key

谁都会走 提交于 2019-12-07 18:16:51

问题


I have some REST API that is proxied over Azure API Management. For some reason I'd like make it available public for all requests. From developer point of view I would like to get rid of setting key in header (or request):

Ocp-Apim-Subscription-Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Is it ever possible?


回答1:


Create a new product and make sure to unckeck "require subscription" in its settings. Add your api to that product and publish it.

Such products are called Open. And any API included in any open product will not require subscription key to be invoked. If API is included into both open and non-open product it will accept subscription key if given, but would not require it still.

Mind that without subscription keys it is impossible to collect any per-used call statistics, thus all such calls would be attributed to Anonymous user.



来源:https://stackoverflow.com/questions/41766485/azure-api-manager-expose-all-to-public-get-rid-of-ocp-apim-subscription-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!