const fixHost = (host) => {
  while (host.slice(-1) === '/') {
    host = host.substring(0, host.length - 1);
  }