Fix sandbox preview in HTTPS and checkout contexts