Gmail操作架构更改

时间:2015-06-15 14:00:19

标签: php curl nginx gmail google-schemas

我能够成功注册Gmail标记,但是当我点击Gmail操作按钮时,持有者令牌根本没有出现在我的后端,并且gmail显示以下消息:

  

无法向mywebsite.com发送请求。

但是当我尝试通过curl发送它时,使用来自谷歌应用引擎的持有者令牌。它工作正常但显示错误消息!这是我从电子邮件中显示的原始图片中获得的架构。

    <script type=3D"application/=
    ld+json">{"@context":"http://schema.org","@type":"EmailMessage","potentialA=
    ction":{"@type":"ConfirmAction","name":"Complete Registration","handler":{"=
    @type":"HttpActionHandler","url":"https://www.mywebsite.com/verify.php?hash=3D9a417a5878e1b5555b9b32a18e663695&id=3D116424&co=
    de=3DitckU314q5SAjLFQ"}},"description":"Verify your account."}</script>

我对此进行了一些研究,似乎Nginx将使用下划线的标头视为无效并丢弃它们。如果是这样的话,为什么下面的卷曲有效?

    curl -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjgwNmFlMDIxZjNmZDA5M2EzYWIzODE1NjQwMzUzMjhiMDQ0MjNlNmYifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiaWQiOiIxMDM4OTA4MTcyOTU4MDYwNTQwNTIiLCJzdWIiOiIxMDM4OTA4MTcyOTU4MDYwNTQwNTIiLCJhenAiOiJnbWFpbEBzeXN0ZW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsImVtYWlsIjoiZ21haWxAc3lzdGVtLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiYXVkIjoiaHR0cHM6Ly9kZXZlbG9wbWVudC5nbWFpbC5jb20iLCJ2ZXJpZmllZF9lbWFpbCI6dHJ1ZSwiY2lkIjoiZ21haWxAc3lzdGVtLmdzZXJ2aWNlYWNjb3VudC5jb20iLCJpYXQiOjE0MzEwNjg2NTIsImV4cCI6MTQzMTA3MjI1Mn0.e1gD2DNST-EbkVvMzjpB7OBtQBoSUR3p6obhsrUVIYMAkm6KHkqs_xL1aJd37IX-03oIMuZNbBV3LVA24y_z527Jm9T1tnKjvMh7_lfFu0jjj_1aasccK7F25mgBJUvRrz5EVQLOoEpkCp_dvkq7qRTpDsuNhA3uaZn_KG5QirY" 'https://www.mywebsite.com/verify.php?hash=499a60a4b6bca7f1ef7e9e8fd905cc4a&id=9999&code=5RbCyniJQKhLqZAd'

1 个答案:

答案 0 :(得分:0)

除了要求将您的电子邮件列入白名单以进行Gmail操作外,您还必须要求将Bearer Tokens列入白名单。