build app urls based on wildcard ssl or app ssl

closes #843