Return secure links if requested

Fixes #1