mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
Reorganize honeypot settings
This commit is contained in:
1 parent
d6b27f2f21
commit
0fb61938ce
3 files changed
+19
-16
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from django.http import HttpResponse
|
||||
from django.test.client import WSGIRequest
|
||||
|
||||
|
||||
def custom_honeypot_error(
|
||||
request: WSGIRequest, context: dict[str, Any]
|
||||
) -> HttpResponse:
|
||||
logging.warning(f"HoneyPot blocked user with ip {request.META.get('REMOTE_ADDR')}")
|
||||
return HttpResponse("Upon reading this, the http client was enlightened.")
|
||||
Reference in new issue
Block a user