G’day,
I have a couple of Svelte Custom UI forge apps, and have managed to get them running in Admin Pages and App Pages in Jira/JSM. The only bit I haven’t got working is routes.
In a prerendered static site (SPA) Svelte apps create routes as new pages in a subdirectory or as another name depending on the configuration for the adapter and layouts… So when you click the route link in the app it tries to load the URL:
https://[UUID].cdn.prod.atlassian-dev.net/[subPageName]
Which gets a 422 with referer policy strict-origin-when-cross-origin response/error
This is probably because the referer URL is:
https://[UUID.cdn.prod.atlassian-dev.net/[UID2]/[UID3]/main/_hostname_togetha-sw.atlassian.net/[Uinique Context ID]/
Ahhhh, just answered my own question: The link used in the application itself has to be relative, eg. in +layout.svelte
<nav class="pages">
<ul>
<li class="menu"><a href="./">Home</a></li>
<li class="menu"><a href="./secondPage">Widgets</a></li>
</ul>
</nav>