Maintain route in general page module

Hi, I’m creating an app use Atlassian Connect Express using hbs views. I’ve setup my app to be a general page and within that page I want to navigate to other pages (views). When I reload the page it redirects back to the main page which is defined in my atlassian-connect.json file.

How do you maintain the state so on a page reload it will retain the route the user was on?

I’ve tried to use the AP.history.pushState which appends a hash to the host url but within the iframe I am unable to retrieve this due to a change atlassian made in 2020 around iframe security.

Any solutions would be much appreciated.

Rich