feat:限制必须api-key或登录4
parent
2abb8f154f
commit
f2c8387e97
|
|
@ -99,8 +99,10 @@ class AnonymousAuthentication(APIView):
|
|||
)
|
||||
def post(self, request: Request):
|
||||
return result.success(
|
||||
AnonymousAuthenticationSerializer(data={'access_token': request.data.get("access_token")}).auth(
|
||||
request),
|
||||
AnonymousAuthenticationSerializer(data={
|
||||
'access_token': request.data.get("access_token"),
|
||||
'api_key': request.data.get("api_key"),
|
||||
}).auth(request),
|
||||
headers={"Access-Control-Allow-Origin": "*", "Access-Control-Allow-Credentials": "true",
|
||||
"Access-Control-Allow-Methods": "POST",
|
||||
"Access-Control-Allow-Headers": "Origin,Content-Type,Cookie,Accept,Token"}
|
||||
|
|
|
|||
Loading…
Reference in New Issue