Welcome Guest, Not a member yet? Register   Sign In
Avoid direct-linking to images
#2

[eluser]Anonymous[/eluser]
There is really no good reason to hide this. You still want the browser to be able to see it don't you ?

In case you want to prevent hotlinking i suggest you filter on http referer (do this on your apache server).

Another way would be to serve all images through a controller. Generate a hash when the page is created, and let it expire after an hour or so.

Code:
<img src="/web/imageController/image.png/thehashjustgenerated" />

When a image is requested on the controller let the controller check if the hash is valid and serve the image.


Messages In This Thread
Avoid direct-linking to images - by El Forum - 05-24-2012, 06:17 AM
Avoid direct-linking to images - by El Forum - 05-24-2012, 06:46 AM
Avoid direct-linking to images - by El Forum - 05-24-2012, 01:41 PM
Avoid direct-linking to images - by El Forum - 05-26-2012, 12:08 PM
Avoid direct-linking to images - by El Forum - 05-26-2012, 12:46 PM
Avoid direct-linking to images - by El Forum - 05-27-2012, 01:51 AM
Avoid direct-linking to images - by El Forum - 05-28-2012, 08:10 AM
Avoid direct-linking to images - by El Forum - 05-30-2012, 01:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB