I am using url2png add-on on cloudinary CDN to capture an image of pages on my site. The code below will work when I try to capture an image on another site like can.com for instance. However, it will not work when I point it my own site.
What could be causing this? How do I get around it?
works:
image = Cloudinary::Uploader.explicit("http://www.cnn.com?unique=#{Time.now}/url2png/viewport=2200x680|unique=true",
:type => "url2png")
doesn't work
image = Cloudinary::Uploader.explicit("localhost:3000?unique=#{Time.now}/url2png/viewport=2200x680|unique=true",
:type => "url2png")
If I hit my staging url from dev it will also work.
EDIT
I'm now realizing that I am having this same experience on my staging server. So when I try to capture a page on my staging server from my staging server I get a 500 (timeout) but if I run the same code from localhost to staging it works. It feel like an origin issue or something. I'm not sure.
UPDATE
So I set up a subdomain on my staging server in hopes that I could hit sub.domain.com from www.domain.com and it would work... still doesn't work.