Use correct document.location.protocol in QR code URL