summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/views/__init__.py2
-rw-r--r--public/views.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/packages/views/__init__.py b/packages/views/__init__.py
index 6b44206a..7941a265 100644
--- a/packages/views/__init__.py
+++ b/packages/views/__init__.py
@@ -27,7 +27,7 @@ from .signoff import signoffs, signoff_package, signoff_options, signoffs_json
@require_safe
@cache_control(public=True, max_age=86400)
def opensearch(request):
- domain = "%s://%s" % (request.scheme, request.META['HTTP_HOST'])
+ domain = "%s://%s" % (request.scheme, request.META.get('HTTP_HOST'))
return render(request, 'packages/opensearch.xml',
{'domain': domain},
diff --git a/public/views.py b/public/views.py
index 16f5db22..910b6c2d 100644
--- a/public/views.py
+++ b/public/views.py
@@ -25,7 +25,7 @@ def index(request):
else:
def updates():
return get_recent_updates()
- domain = "%s://%s" % (request.scheme, request.META['HTTP_HOST'])
+ domain = "%s://%s" % (request.scheme, request.META.get('HTTP_HOST'))
context = {
'news_updates': News.objects.order_by('-postdate', '-id')[:15],
'pkg_updates': updates,