changed embed to use the same for http and https OPS-343