Review Mozilla 1675054: Enable brotli encoding in secure context, not just for https

https://bugzilla.mozilla.org/show_bug.cgi?id=1675054

Looks like something we should ensure is also working for http or https+self-signed onions as well