feat(router): add optional HTTP to HTTPS redirect

replaces #2635