搞定docker所需的通过环境变量控制

This commit is contained in:
2025-11-15 15:20:26 +08:00
parent e1152bdc86
commit 046b649aec
5 changed files with 48 additions and 9 deletions

View File

@@ -6,7 +6,7 @@ import hmac
from django.http import JsonResponse, HttpResponseBadRequest
from django.shortcuts import render, redirect
from django.views.decorators.http import require_http_methods
from django.views.decorators.csrf import csrf_protect
from django.views.decorators.csrf import csrf_protect, ensure_csrf_cookie
from django.conf import settings
from .es_client import get_user_by_username
@@ -14,6 +14,7 @@ from .crypto import salt_for_username, hmac_sha256
@require_http_methods(["GET"])
@ensure_csrf_cookie
def login_page(request):
return render(request, "accounts/login.html")