Revert "Revert "Fix for authority enforcement when using inside of GO xPost plugin.""

This reverts commit 79b72d3f3def5f527ed6bb3606a2e9aaafd8fa3f.