Update picture, update documentation

This commit is contained in:
Nico Schottelius 2019-02-05 15:10:21 +01:00
parent daa48c907f
commit 243e10d809
3 changed files with 9 additions and 5 deletions

View file

@ -53,15 +53,16 @@
{% if domain != "" %}
The site you tried to access is not reachable by IPv4.
To access <a href="{{ back_to_url }}" target="_blank">{{ domain }}</a>
{% else %}this part of the Internet{% endif %}, you need to enable
IPv6 on your computer.
{% else %}this part of the Internet{% endif %},
you need to enable IPv6 on your computer.
<br>
Find
out
<a href="https://ungleich.ch/en-us/cms/blog/2019/02/05/how-to-get-ipv6/">
how to enable IPv6</a>
or
<a href="https://redmine.ungleich.ch/projects/open-infrastructure/wiki/How_to_disable_IPv4_on_your_website">How
to use this service for your IPv6 only service.</a>
<a href="https://redmine.ungleich.ch/projects/open-infrastructure/wiki/How_to_disable_IPv4_on_your_website">how
to use this service</a> for your IPv6 only service.
</p>
</div>
<footer class="center">

View file

@ -2,6 +2,7 @@ from urllib.parse import urlsplit
from django.views.generic import TemplateView
import re
# Create your views here.
@ -16,6 +17,8 @@ class IndexView(TemplateView):
if "back_to" in self.request.GET:
back_to_url = self.request.GET["back_to"]
elif 'HTTP_HOST' in self.request.META:
# Exclude ourselves
if not re.match("^(no-ipv4-here.ungleich.ch|localhost)", self.request.META['HTTP_HOST']):
back_to_url = "http://{}".format(self.request.META['HTTP_HOST'])
context['back_to_url'] = back_to_url
if back_to_url != "":

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 45 KiB