diff options
| author | Ben Busby <contact@benbusby.com> | 2022-01-27 11:57:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-27 11:57:41 -0700 |
| commit | 932f3bbcab9be82aafb487d7890fde83b2210a7b (patch) | |
| tree | 4261df31d3964475057a6139908ce96ad87592b5 /route.eex | |
| parent | 724a995fd9263194b255b82c68a48b5b6e735e30 (diff) | |
| download | farside-932f3bbcab9be82aafb487d7890fde83b2210a7b.tar.gz | |
Preserve redirect with `/_/` path prefix (#13)
This adds a straightforward way of preserving Farside's redirecting
behavior in the user's browser history. That way if an instance becomes
unavailable between the 5 min scans, the user can opt to navigate back
one page and be taken to a new instance.
This is accomplished using a single line of JS, and could potentially
work as the default behavior of Farside (with the current default
behavior requiring a path prefix instead). This should be revisited down
the road when more people are using this service.
Diffstat (limited to 'route.eex')
| -rw-r--r-- | route.eex | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/route.eex b/route.eex new file mode 100644 index 0000000..a06a265 --- /dev/null +++ b/route.eex @@ -0,0 +1,10 @@ +<head> + <title>Farside Redirect - <%= service %></title> + <meta http-equiv="refresh" content="1; url=<%= instance_url %>"> + <script> + history.pushState({page: 1}, "Farside Redirect"); + </script> +</head> +<body> + <span>Redirecting to <%= service %> instance... +</body> |
