summaryrefslogtreecommitdiff
path: root/contact
diff options
context:
space:
mode:
authorPaolo Melchiorre <paolo@melchiorre.org>2022-12-25 17:04:59 +0100
committerGitHub <noreply@github.com>2022-12-25 10:04:59 -0600
commita59d6f55baca966cee3b6f31416fe8e6c42721ad (patch)
tree5558c10922be8a921dbcb46e47b4dd374724df08 /contact
parent5b58b15c2113a28c2edc452ad6d04c8915acf148 (diff)
Fixed #1293 -- Modernize to Django 3.2/Python 3.8 (#1294)
Diffstat (limited to 'contact')
-rw-r--r--contact/forms.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/contact/forms.py b/contact/forms.py
index 99775656..deb0d4bb 100644
--- a/contact/forms.py
+++ b/contact/forms.py
@@ -59,8 +59,8 @@ class BaseContactForm(ContactForm):
akismet_data = {
"user_ip": self.request.META.get("REMOTE_ADDR", ""),
- "user_agent": self.request.META.get("HTTP_USER_AGENT", ""),
- "referrer": self.request.META.get("HTTP_REFERER", ""),
+ "user_agent": self.request.headers.get("user-agent", ""),
+ "referrer": self.request.headers.get("referer", ""),
"comment_content": force_bytes(self.cleaned_data["body"]),
"comment_author": self.cleaned_data.get("name", ""),
"comment_author_email": self.cleaned_data.get("email", ""),