back-port base-uri updates from master to pull uri from Host header