diff --git a/views/index.eta b/views/index.eta index e41c48c..3852196 100644 --- a/views/index.eta +++ b/views/index.eta @@ -58,11 +58,30 @@

You have reached the end of the IPv4 Internet. - <% if (it.back_to_url) { %> + <% if (it.back_to_url) { + let normalizedUrl = it.back_to_url; + let displayDomain = it.domain; + + try { + if (it.back_to_url) { + // Normalize URL by adding protocol if missing + if (!it.back_to_url.startsWith('http')) { + normalizedUrl = `http://${it.back_to_url}`; + } + + const url = new URL(normalizedUrl); + displayDomain = url.hostname; + } + } catch (e) { + // Fall back to original values if parsing fails + normalizedUrl = it.back_to_url; + displayDomain = it.domain || it.back_to_url; + } + %>

- The site <%= it.domain %> is not reachable by IPv4. + The site <%= displayDomain %> is not reachable by IPv4. To access - <%= it.domain %>, + <%= displayDomain %>, you need to enable IPv6 on your computer.

<% } %>