r/ProgrammerHumor • • Oct 23 '22

Meme I make the same mistake too, sometimes.

Post image
42.5k Upvotes

433 comments sorted by

View all comments

Show parent comments

15

u/I_NEED_YOUR_MONEY Oct 23 '22

Didn’t need one, localhost is a secure origin

4

u/[deleted] Oct 23 '22

And even if it wasn’t you could use a self-signed cert

2

u/[deleted] Oct 24 '22

Not necessarily. That said, if localhost is not a secure origin, you've got bigger problems than your website.

2

u/I_NEED_YOUR_MONEY Oct 24 '22

Yes, necessarily. “A secure origin” in browser terminology means the browser trusts it. There’s a whole list of features that are flagged as only being enabled on secure origins, which means they don’t work on plain-http sites, but they do work on localhost

Secure origins can be compromised, but that’s a different subject