gpt4 book ai didi

amp-html - 由于摄取错误 : Invalid Content 导致公钥无效

转载 作者:行者123 更新时间:2023-12-03 17:28:26 25 4
gpt4 key购买 nike

我正在尝试使某些 AMP 页面无效。我读了 documentation和一些 GitHub 问题,我知道的越多,我理解的就越少。 ;)

我猜我的公钥从未被抓取过。

通过
https://developers.google.com/amp/cache/update-cache#update-rsa-keys

If you want to update your RSA key, you can access the RSA key through the AMP Cache link and Google may crawl your new RSA key within several hours. Here is the AMP Cache link:

https://example-com.< cache.updateCacheApiDomainSuffix >/r/s/example.com/.well-known/amphtml/apikey.pub



所以根据这个我的网址是:
https://www-bronchicum-de.cdn.ampproject.org/r/s/www.bronchicum.de/.well-known/amphtml/apikey.pub
key 位于: https://www.bronchicum.de/.well-known/amphtml/apikey.pub (通过纯文本/文本公开提供)

不幸的是,我只得到:

  1. That’s an error.

The requested URL /r/s/www.bronchicum.de/.well-known/amphtml/apikey.pub was not found on this server. That’s all we know.



当我尝试使缓存无效(使用 digitalbrands/amp-cache )或自己编写的 bash 脚本时,我得到以下信息:

  1. That’s an error.

Your client does not have permission to get URL /update-cache/c/s/www.bronchicum.de/amp?amp_action=flush&amp_ts=1572261663&amp_url_signature=BxYM4-ky5wEVmeixpTqMZec3aDhUxcbkT32-kSXufPeO1fGFJ_p7I-xiPKih0oF5AOJy3XnLIvXy_btLXblOALb82BKvHj4UWtiWmtSgV3n-vH5_TVlrDU88UAa_EEZ4sDODwt2Auo1gREd4tZ_BDdXSbDBU5muCbld8KGiSO7mbQ62wWjWhZeXyo6AXqg7AmgCp5wdlwT1f00miYvALUB0gk7f9uDjTsEGIpEvGEwWQE0MllSiYXZ0XnwW2oGaJh8e3ofx0vx72omy9g5i6szgEgT_QR8hEPV_FTXN6V9n0E9A3drAOdyXGVKmFQHLP-knAI-sqfcrRMH2pNc856A from this server. (Client IP address: x.x.x.x)

Invalid public key due to ingestion error: Invalid Content That’s all we know.



Soooo...我的公钥有问题吗?
openssl dgst -sha256 -signature signature.bin -verify pulic-key.pem url.txt

说“验证正常”。谁能帮帮我吗? :)

最佳答案

只要确保您对 /.well-known/amphtml/apikey.pub 的回复有 Context-Type带有值的标题 text/plain .
例如,如果您有一个 apache httpd 服务器,则在 .htaccess 中添加以下几行文件。

<FilesMatch "apikey.pub">
ForceType text/plain
</FilesMatch>
在此之后,尝试提交 update cache它应该说“好”。

关于amp-html - 由于摄取错误 : Invalid Content 导致公钥无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58592228/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com