Merge branch 'dev'
This commit is contained in:
commit
52bd8df671
@ -62,8 +62,7 @@ def ingress_request(
|
|||||||
last_seen__gt=timezone.now() - timezone.timedelta(minutes=10),
|
last_seen__gt=timezone.now() - timezone.timedelta(minutes=10),
|
||||||
ip=ip,
|
ip=ip,
|
||||||
user_agent=user_agent,
|
user_agent=user_agent,
|
||||||
)
|
).first()
|
||||||
.first()
|
|
||||||
# We used to check for identifiers, but that can cause issues when people
|
# We used to check for identifiers, but that can cause issues when people
|
||||||
# re-open the page in a new tab, for example. It's better to match sessions
|
# re-open the page in a new tab, for example. It's better to match sessions
|
||||||
# solely based on IP and user agent.
|
# solely based on IP and user agent.
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.shortcuts import render, reverse
|
from django.shortcuts import render, reverse
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.decorators import method_decorator
|
from django.utils.decorators import method_decorator
|
||||||
from django.views.decorators.csrf import csrf_exempt
|
from django.views.decorators.csrf import csrf_exempt
|
||||||
from django.conf import settings
|
|
||||||
from django.views.generic import TemplateView, View
|
from django.views.generic import TemplateView, View
|
||||||
from ipware import get_client_ip
|
from ipware import get_client_ip
|
||||||
|
|
||||||
|
@ -256,4 +256,3 @@ ONLY_SUPERUSERS_CREATE = os.getenv("ONLY_SUPERUSERS_CREATE", "True") == "True"
|
|||||||
# Should the script use HTTPS to send the POST requests? The hostname is from
|
# Should the script use HTTPS to send the POST requests? The hostname is from
|
||||||
# the django SITE default. (Edit it using the admin panel.)
|
# the django SITE default. (Edit it using the admin panel.)
|
||||||
SCRIPT_USE_HTTPS = os.getenv("SCRIPT_USE_HTTPS", "True") == "True"
|
SCRIPT_USE_HTTPS = os.getenv("SCRIPT_USE_HTTPS", "True") == "True"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user