Author

Topic: How does the image proxy work? (Read 2473 times)

sr. member
Activity: 242
Merit: 250
February 05, 2015, 01:56:36 AM
#11
Thank's theymos for clarifying this!
legendary
Activity: 1666
Merit: 1185
dogiecoin.com
February 04, 2015, 06:43:23 PM
#10
While we have you, how does the proxy know if the source image has changed content, even if its at the same URL as before? Would it take ~ a month in order to refresh or is there another check that happens?

There is no caching on the bitcointalk.org side. The image is always passed directly from the source server to the user. Any Expires or Cache-Control headers sent by the origin server are passed through as well, so caching might be done by the client.

The code is computed from the URL, not the image data.

Thanks.

Can we also whitelist flickr? Images always fall on one of the below:

https://farm1.staticflickr.com
https://farm2.staticflickr.com
https://farm3.staticflickr.com
https://farm4.staticflickr.com
https://farm5.staticflickr.com
https://farm6.staticflickr.com
https://farm7.staticflickr.com
https://farm8.staticflickr.com
https://farm9.staticflickr.com
https://farm10.staticflickr.com
administrator
Activity: 5222
Merit: 13032
February 04, 2015, 06:31:25 PM
#9
While we have you, how does the proxy know if the source image has changed content, even if its at the same URL as before? Would it take ~ a month in order to refresh or is there another check that happens?

There is no caching on the bitcointalk.org side. The image is always passed directly from the source server to the user. Any Expires or Cache-Control headers sent by the origin server are passed through as well, so caching might be done by the client.

The code is computed from the URL, not the image data.
legendary
Activity: 1666
Merit: 1185
dogiecoin.com
February 04, 2015, 06:10:37 PM
#8
A proper image proxy link looks like:
https://ip.bitcointalk.org/?u=http%3A%2F%2Fcdn.images.express.co.uk%2Fimg%2Fdynamic%2F1%2F590x%2FDog-handler-431049.jpg&t=549&c=fnsjPOVuf7KyWA

Notice that it has "t" and "c" parameters. These are used to check that the link was generated by the forum. Link generation is done whenever posts are loaded (at the bbcode parsing stage). So the links change over time. (Image proxy links expire after a month or two, so you can't just generate a valid link and then use it forever.)

While we have you, how does the proxy know if the source image has changed content, even if its at the same URL as before? Would it take ~ a month in order to refresh or is there another check that happens?
administrator
Activity: 5222
Merit: 13032
February 04, 2015, 04:29:58 PM
#7
A proper image proxy link looks like:
https://ip.bitcointalk.org/?u=http%3A%2F%2Fcdn.images.express.co.uk%2Fimg%2Fdynamic%2F1%2F590x%2FDog-handler-431049.jpg&t=549&c=fnsjPOVuf7KyWA

Notice that it has "t" and "c" parameters. These are used to check that the link was generated by the forum. Link generation is done whenever posts are loaded (at the bbcode parsing stage). So the links change over time. (Image proxy links expire after a month or two, so you can't just generate a valid link and then use it forever.)
sr. member
Activity: 242
Merit: 250
February 04, 2015, 10:59:55 AM
#6
Not only 1 reply which answers my question.
legendary
Activity: 1666
Merit: 1185
dogiecoin.com
February 04, 2015, 07:05:28 AM
#5
I thought that the post proxy image links do not work if you put them back through the proxy. Let me test now. By the way, imgur links bypass the proxy altogether.



Then editing post and putting the proxied image back through:



Yep. So you can't address the images directly on the proxy already. I'm not sure if that was the question or we'd already established that but there you go Tongue
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
February 04, 2015, 06:55:26 AM
#4
Hey, does anyone know how ip.bitcointalk.org knows if a specific image has been posted on bitcointalk.org?

Since putting random image urls to the proxy fails.

This is one of the reason:
If the image url contains a valid image extension ie: jpg,png,gif etc, image proxy will work otherwise it won't.

and the other might be:


Ah my bad sorry, I guess image proxy is not working for new images since January. Old images are working because they are cached by the proxy.


Actually, the both links posted above is working for me.
sr. member
Activity: 242
Merit: 250
legendary
Activity: 1274
Merit: 1004
February 04, 2015, 03:19:57 AM
#2
If the image url contains a valid image extension ie: jpg,png,gif etc, image proxy will work otherwise it won't.

For example:

Test
Code:
[img]http://imgur.com/YbpEcb0[/img]


Code:
[img]https://i.imgur.com/YbpEcb0.png[/img]


sr. member
Activity: 242
Merit: 250
February 04, 2015, 03:15:28 AM
#1
Hey, does anyone know how ip.bitcointalk.org knows if a specific image has been posted on bitcointalk.org?

Since putting random image urls to the proxy fails.
Jump to: