Implementing a https enabled redirect service using Firebase
More and more web-traffic is moving to https instead of http protocol. Because users are using a modern browser that defaults to https or a browser extension like Https-By-Default . A great development from a security- and privacy perspective. But with some side effects as it pointed out that the redirect service offered by our hosting provider does not fully support https which causes a security warning.
Although valid commercial solutions are available this fully triggered my (somewhat rusty) not invented here syndrome. Performing the redirect sounds like a suitable functionality for a simple cloud function. With the additional requirement that it should be able to host the cloud function on the (sub)domain(s) we want to use for our redirects.
This blog post will describe the simple steps to develop a cloud function using Firebase Functions and expose it through Firebase Hosting over https using a valid certificate.