Quick Tip: Serve Parse Files via HTTPS

Trying to serve your Parse files via SSL/HTTPS? You’ll notice that you can’t force it, and Parse doesn’t support this via their file URL scheme. But you can use the same trick Parse uses on Anypic.

Replace http:// with https://s3.amazonaws.com/.

So if you start with this:

http://files.parsetfss.com/b05e3211-bf8b-.../tfss-fa825f28-e541-...-jpg

The final url will look something like this:

https://s3.amazonaws.com/files.parsetfss.com/b05e3211-bf8b-.../tfss-fa825f28-e541-...-jpg

In ruby, that’s:

url.gsub "http://", "https://s3.amazonaws.com/"

In JavaScript:

var url = // your url...
var subbedUrl = url.replace("http://", "https://s3.amazonaws.com/");

Boom - fully secure Parse files.

You’re welcome.

 
4
Kudos
 
4
Kudos

Now read this

Nonchalant Arrogance, Intellect, and Caring About Your Work

I recently encountered a demeanor that I couldn’t quite place. I anonymously overheard a conversation and, unfortunately, let it get under my skin enough to tell you about it. I (somewhat ashamedly) tried to find some kind of a meme that... Continue →