Seems like it would be better to do
```mako
http{% if is_secure %}s{% endif %}://{{domain}} #...
```