support localhost for upstream