Requiring HTTPS

Learn how to enable HTTPS in a function to encrypt the exchange of information between the server and the client.

HTTPS basics

HTTPS is a secure version of Hypertext Transfer Protocol (HTTP). When HTTPS is enabled, the information exchanged between the client and the server is encrypted. Only the client and the server can read it because only these participants have access to the encryption and decryption keys.

The keys are enabled by a special certificate that is signed by a recognized certification authority and is granted to a specific domain. The protocol used by the certificate is Secure Socket Layer (SSL), and its updated version is known as Transport Layer Security (TLS).

Get hands-on with 1200+ tech skills courses.