Connect Express: Link from glance iframe to add on configuration page

What is the proper way to generate links to a web item from view files? In my case I am showing an error the user inside the issue glance iframe and showing a link to the add-on configuration page.
Right now my links looks like this:

Could not connect to backend, please check your <a target="_top" href="{{hostBaseUrl}}/plugins/servlet/ac/my-jira-addon/configure">configuration</a>

Is there a better way instead of hardcoding the path?