You actually can't with cloud endpoint version 1, as stated in the doc. It comes out of the box with version 2 (beta as of March 2017)
Note: version 1 of the Google Cloud Endpoints Frameworks did not support custom domains but version 2 does.
Same question on stackoverflow: