Generating Secure (https) URLs from AppEngine ImagesService

31 views
Skip to first unread message

Tad via StackOverflow

unread,
May 17, 2017, 9:58:10 AM5/17/17
to google-appengin...@googlegroups.com

Google's AppEngine ImagesService by default returns non-secure (http) URLs for images. It would be good if it had a methoed that would generate secure (https) URLs. For example, getServingUrl could be complemented by getSecureServingUrl.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/44026874/generating-secure-https-urls-from-appengine-imagesservice

Tad via StackOverflow

unread,
May 17, 2017, 9:58:12 AM5/17/17
to google-appengin...@googlegroups.com

A (less then adequate) workaround is to simply replace http:// with https:// in the URL. This works, but since it is undocumented, it could presumably stop working at any time. For example:

url.replaceAll("^http", "https")

would work.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/44026874/generating-secure-https-urls-from-appengine-imagesservice/44026875#44026875

Andrei Volgin via StackOverflow

unread,
May 17, 2017, 12:13:07 PM5/17/17
to google-appengin...@googlegroups.com

getServingUrl method already allows you to specify "secure" in ServingUrlOptions.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/44026874/generating-secure-https-urls-from-appengine-imagesservice/44029965#44029965
Reply all
Reply to author
Forward
0 new messages