Sample code for loopback using SSL with HTTPS redirect