Add nginx routing spi

The first two commits were necessary to get messaging working. The third is just a nicety. I haven't tested in an all in one config, but in my fully HA environment this works.