I am working on a node.js app. It presents the art of a friend of mine. Besides some general information and a lot of pictures it also includes a contact form for people who want to contact him about his work. I want to encrypt the contact page to protect the personal data that is send through the form but keep the rest of the page unencrypted to reduce the loading time of the page.
I already managed to create a HTTPS server which encrypts my entire website. But I just want to have an encrypted connection for the contact page.
Does anyone know how to implement that?
One solution I though of would be to create two node.js servers. One HTTP server and one HTTPS server and then run the main page on the HTTP server and the contact page on the HTTPS server. The link to the contact page would then include https. Something like: "https://www.domain.com/contact".
But somehow that doesn't feel like the right way so I am hoping that someone has a better solution.
Thank you for your help!