Added rstrip to avoid extra spaces taking endpoints from templated configuration