Azure API管理器将所有内容公开,摆脱Ocp-Apim-Subscription-Key [英] Azure API Manager expose all to public, get rid of Ocp-Apim-Subscription-Key

查看:143
本文介绍了Azure API管理器将所有内容公开,摆脱Ocp-Apim-Subscription-Key的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些基于Azure API管理的REST API.由于某种原因,我想将其公开以用于所有请求.从开发人员的角度来看,我想摆脱在标头(或请求)中设置键的方法:

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

有可能吗?

推荐答案

创建一个新产品,并确保取消其设置中的需要订阅".将您的api添加到该产品并发布.

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

这类产品称为Open.并且任何开放产品中包含的任何API都不需要调用订阅密钥.如果开放式和非开放式产品均包含API,则如果提供了订阅密钥,它将接受订阅密钥,但仍不需要订阅密钥.

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.

这篇关于Azure API管理器将所有内容公开,摆脱Ocp-Apim-Subscription-Key的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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