安全 Dialogflow 履行请求 headers
Security Dialogflow fulfillment request headers
这是 话题的跟进。
那里有答案
explore the req.headers.authorization you will find an authentication variable
(concat these three things:
Your dialogflow username
The character ':'
Your dialogflow password
and encode it in base64)
有道理,但在我的 python 实现中
请求 headers 我得到的是:
Accept: */*
Content-Type: application/json; charset=UTF-8
Content-Length: 571
Host: xxxxxxxx
User-Agent: Apache-HttpClient/4.5.4 (Java/1.8.0_151)
Accept-Encoding: gzip,deflate
X-Forwarded-Proto: https
X-Forwarded-For: xx.xxxx.xx..xx
PS: I tried both V1 and V2
不确定如何处理授权
您必须在 Fullfilment 设置中设置基本身份验证字段(Fullfilment-URL 下方的字段)。只有这样你才会在 Authorization
Header.
中收到 base64 编码的部分
这与您用于登录 dialogflow 的个人凭据无关! 不要将它们用于基本身份验证!
这是
那里有答案
explore the req.headers.authorization you will find an authentication variable
(concat these three things: Your dialogflow username
The character ':'
Your dialogflow password
and encode it in base64)
有道理,但在我的 python 实现中 请求 headers 我得到的是:
Accept: */*
Content-Type: application/json; charset=UTF-8
Content-Length: 571
Host: xxxxxxxx
User-Agent: Apache-HttpClient/4.5.4 (Java/1.8.0_151)
Accept-Encoding: gzip,deflate
X-Forwarded-Proto: https
X-Forwarded-For: xx.xxxx.xx..xx
PS: I tried both V1 and V2
不确定如何处理授权
您必须在 Fullfilment 设置中设置基本身份验证字段(Fullfilment-URL 下方的字段)。只有这样你才会在 Authorization
Header.
这与您用于登录 dialogflow 的个人凭据无关! 不要将它们用于基本身份验证!