support endpoint domain
Merge branch 'endpoint' into storage
fix broken tests
apply review comments
Merge pull request #1504 from xmbms/storage

Support custom storage endpoint domain