We can probably just do `if (restCtx.refererHeader) {` here ?