modfiied to not to expose api on admin network if public is not