2026-10-21T10:13:00.183281Z [error    ] Invalid HTTP_HOST header: 'evil.example'. You may need to add 'evil.example' to ALLOWED_HOSTS. [django.security.DisallowedHost]
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ /home/dev/eventhub/.venv/lib/python3.12/site-packages/django/core/handlers/exception.py:55 in inner                                                                                                                                                                                                                                   │
│                                                                                                                                                                                                                                                                                                                                                                                                              │
│    52 │   │   @wraps(get_response)                                                             ╭──────────────────────────────────────────────────────────── locals ─────────────────────────────────────────────────────────────╮                                                                                                                                                                           │
│    53 │   │   def inner(request):                                                              │          exc = DisallowedHost("Invalid HTTP_HOST header: 'evil.example'. You may need to add 'evil.example' to ALLOWED_HOSTS.") │                                                                                                                                                                           │
│    54 │   │   │   try:                                                                         │ get_response = <CommonMiddleware get_response=convert_exception_to_response.<locals>.inner>                                     │                                                                                                                                                                           │
│ ❱  55 │   │   │   │   response = get_response(request)                                         │      request = <WSGIRequest: GET '/api/events/'>                                                                                │                                                                                                                                                                           │
│    56 │   │   │   except Exception as exc:                                                     ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯                                                                                                                                                                           │
│    57 │   │   │   │   response = response_for_exception(request, exc)                                                                                                                                                                                                                                                                                                                                        │
│    58 │   │   │   return response                                                                                                                                                                                                                                                                                                                                                                            │
│                                                                                                                                                                                                                                                                                                                                                                                                              │
│ /home/dev/eventhub/.venv/lib/python3.12/site-packages/django/utils/deprecation.py:119 in __call__                                                                                                                                                                                                                                     │
│                                                                                                                                                                                                                                                                                                                                                                                                              │
│   116 │   │   │   return self.__acall__(request)                                               ╭──────────────────────────────────────── locals ─────────────────────────────────────────╮                                                                                                                                                                                                                   │
│   117 │   │   response = None                                                                  │  request = <WSGIRequest: GET '/api/events/'>                                            │                                                                                                                                                                                                                   │
│   118 │   │   if hasattr(self, "process_request"):                                             │ response = None                                                                         │                                                                                                                                                                                                                   │
│ ❱ 119 │   │   │   response = self.process_request(request)                                     │     self = <CommonMiddleware get_response=convert_exception_to_response.<locals>.inner> │                                                                                                                                                                                                                   │
│   120 │   │   response = response or self.get_response(request)                                ╰─────────────────────────────────────────────────────────────────────────────────────────╯                                                                                                                                                                                                                   │
│   121 │   │   if hasattr(self, "process_response"):                                                                                                                                                                                                                                                                                                                                                          │
│   122 │   │   │   response = self.process_response(request, response)                                                                                                                                                                                                                                                                                                                                        │
│                                                                                                                                                                                                                                                                                                                                                                                                              │
│ /home/dev/eventhub/.venv/lib/python3.12/site-packages/django/middleware/common.py:48 in process_request                                                                                                                                                                                                                               │
│                                                                                                                                                                                                                                                                                                                                                                                                              │
│    45 │   │   │   │   │   raise PermissionDenied("Forbidden user agent")                       ╭───────────────────────────────────────── locals ──────────────────────────────────────────╮                                                                                                                                                                                                                 │
│    46 │   │                                                                                    │    request = <WSGIRequest: GET '/api/events/'>                                            │                                                                                                                                                                                                                 │
│    47 │   │   # Check for a redirect based on settings.PREPEND_WWW                             │       self = <CommonMiddleware get_response=convert_exception_to_response.<locals>.inner> │                                                                                                                                                                                                                 │
│ ❱  48 │   │   host = request.get_host()                                                        │ user_agent = None                                                                         │                                                                                                                                                                                                                 │
│    49 │   │                                                                                    ╰───────────────────────────────────────────────────────────────────────────────────────────╯                                                                                                                                                                                                                 │
│    50 │   │   if settings.PREPEND_WWW and host and not host.startswith("www."):                                                                                                                                                                                                                                                                                                                              │
│    51 │   │   │   # Check if we also need to append a slash so we can do it all                                                                                                                                                                                                                                                                                                                              │
│                                                                                                                                                                                                                                                                                                                                                                                                              │
│ /home/dev/eventhub/.venv/lib/python3.12/site-packages/django/http/request.py:203 in get_host                                                                                                                                                                                                                                          │
│                                                                                                                                                                                                                                                                                                                                                                                                              │
│   200 │   │   │   │   msg += (                                                                 ╭─────────────────────────────────────────────── locals ────────────────────────────────────────────────╮                                                                                                                                                                                                     │
│   201 │   │   │   │   │   " The domain name provided is not valid according to RFC 1034/1035." │ allowed_hosts = ['localhost']                                                                         │                                                                                                                                                                                                     │
│   202 │   │   │   │   )                                                                        │        domain = 'evil.example'                                                                        │                                                                                                                                                                                                     │
│ ❱ 203 │   │   │   raise DisallowedHost(msg)                                                    │          host = 'evil.example'                                                                        │                                                                                                                                                                                                     │
│   204 │                                                                                        │           msg = "Invalid HTTP_HOST header: 'evil.example'. You may need to add 'evil.example' to "+14 │                                                                                                                                                                                                     │
│   205 │   def get_port(self):                                                                  │          port = ''                                                                                    │                                                                                                                                                                                                     │
│   206 │   │   """Return the port number for the request as a string."""                        │          self = <WSGIRequest: GET '/api/events/'>                                                     │                                                                                                                                                                                                     │
│                                                                                                ╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯                                                                                                                                                                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
DisallowedHost: Invalid HTTP_HOST header: 'evil.example'. You may need to add 'evil.example' to ALLOWED_HOSTS.

400 b'<!DOCTYPE html>\n<html lang="en">\n<head>\n  <meta http-equiv="content-type" content="text/html; charset=utf-8">\n  <meta name="robots" content="NONE,NOARCHIVE">\n  <title>DisallowedHost\n          at /api/events/</title>\n  <style>\n    html * { padding:0; margin:0; }\n    body * { padding:10px 20px; }\n    '
