Tad
Tad

Reputation: 4784

Generating Secure (https) URLs from AppEngine ImagesService

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.

Upvotes: 0

Views: 29

Answers (2)

Tad
Tad

Reputation: 4784

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.

Upvotes: 0

Andrei Volgin
Andrei Volgin

Reputation: 41089

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

Upvotes: 1

Related Questions