mirror of
https://github.com/benbusby/farside.git
synced 2025-03-14 11:16:34 -04:00

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.
11 lines
275 B
Elixir
11 lines
275 B
Elixir
<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>
|