using https on localhost and http on production behind nginx