Add res conditional.
Merge pull request #78 from krakenjs/nores

Add res conditional and only use host part of registry.