从Amazon CloudFront在Pinterest和Twitter中获取图像的问题 [英] Image Fetch issues in Pinterest and Twitter from Amazon CloudFront

查看:95
本文介绍了从Amazon CloudFront在Pinterest和Twitter中获取图像的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个指向AWS ec2的服务器。 -domain:-hometriangle.com

I have got a server which points to AWS ec2. - domain:-hometriangle.com

并且使用SSL从AWS CloudFront提供图像,该SSL内部指向ec2 。: domain:-static.hometriangle.com

And the Images are getting served from AWS CloudFront with SSL which internally points to ec2.: domain:-static.hometriangle.com

Pinterest和Twitter均无法获取图像。

Both Pinterest and Twitter are not able to fetch images. Whereas Facebook and Google are handling it well.

Twitter错误:我在Card Validator中收到以下日志

Twitter errors:I get following logs in Card Validator

> INFO: Page fetched successfully INFO: 22 metatags were found INFO:
> twitter:card = gallery tag found ERROR: Internal Proxy Image Service
> Error (twitter:image0) ERROR: Internal Proxy Image Service Error
> (twitter:image1) ERROR: Internal Proxy Image Service Error
> (twitter:image2) ERROR: Internal Proxy Image Service Error
> (twitter:image3) ERROR: Internal Proxy Image Service Error

Pinterest错误:糟糕,无法获取/某些东西是错误的。

Pinterest Errors: Oops Unable to fetch/ Something is wrong.

我的cdn url的robots.txt看起来像这样

My robots.txt for cdn url looks like this

User-agent: Twitterbot
Disallow:

User-agent: Pinterest 
Disallow:

User-agent: *
Allow: /robots.txt
Allow: /imagecache/*
Disallow: /

使用的元标记示例:

<meta property="og:image" content="https://static.hometriangle.com/imagecache/media/2916/htr-image-small-bathroom-390-2916.jpg?size=1200x630-3"/>
<meta property="twitter:image0" content="https://static.hometriangle.com/imagecache/media/2916/htr-image-small-bathroom-390-2916.jpg?size=1200x630-3"/>

如果我将Cloudfront URL替换为直接URL,则会获取图像。可能是什么问题?

If I replace cloudfront urls with direct urls, Images are getting fetched. What could be the issue?

其中一个错误页面: https:// hometriangle.com/photos/2/bathroom
错误图片之一: https://static.hometriangle.com/imagecache/media/2916/htr-image-small-bathroom-390-2916.jpg? size = 1200x630-3

One of the Errorneous Page: https://hometriangle.com/photos/2/bathroom One of the Errorneous Image: https://static.hometriangle.com/imagecache/media/2916/htr-image-small-bathroom-390-2916.jpg?size=1200x630-3

推荐答案

我在Pinterest上也遇到了这个问题。一些实验表明,Pinterest在基于SNI(服务器名称指示)的SSL连接方面存在问题。

I've also encountered this issue with Pinterest. Some experimenting revealed that Pinterest has issues with SNI (Server Name Indication) -based SSL connections.

为了证明这一点,我设置了两个新的Cloudfront发行版。两者都启用了SSL,一个使用默认的Cloudfront证书,另一个使用我的自定义证书和必需的SNI。我没有预算尝试每月$ 600的SSL选项,因此无法对此发表评论。

To demonstrate this, I set up 2 new Cloudfront distributions. Both had SSL enabled, one used the default Cloudfront certificate and the other used my custom certificate and required SNI. I don't have the budget to try the $600/month SSL option so I can't comment on that.

两个发行版都可以通过浏览器使用Cloudfront URL访问

Both distributions were accessible via the browser using the Cloudfront URL over SSL.

Pinterest可以从非SNI发行版本中固定,但无法从基于SNI的发行版本中固定。

Pinterest was able to pin from the non-SNI distribution but unable to pin from the SNI-based distribution.

我一周前向Pinterest发送了一个支持请求,但我得到的只是自动回复。宝物。

I sent Pinterest a support request over a week ago but all I got was automated responses. Bom-bom.

这是SNI上的Wiki。所有主要的现代浏览器都支持它,但我想写的Pinterest都不支持。
http://en.wikipedia.org/wiki/Server_Name_Indication

Here's the wiki on SNI. All major modern browsers support it but I guess whatever Pinterest is written in does not. http://en.wikipedia.org/wiki/Server_Name_Indication

这篇关于从Amazon CloudFront在Pinterest和Twitter中获取图像的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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