0

Is there a way to prevent hot linking for images that are served by the Images Service method get_serving_url()?

I only found this answer but I don't think it would apply to get_serving_url().

Community
  • 1
  • 1
MichalM
  • 45
  • 4

2 Answers2

2

No - If you want any kind of access control for images you're serving from Blobstore/Google Storage then you should write a BlobstoreDownloadHandler and use send_blob to return the image after doing whatever access control you would like.

If you're using the crop or resize options of get_serving_url() then you would need to do this transformation yourself and store the result in blobstore, which is what you would then return.

Stuart Langley
  • 7,044
  • 1
  • 20
  • 20
1

No, you cannot do referrer checks on blobstore or image service URLs.

Adam Thomason
  • 993
  • 1
  • 8
  • 10