[API] 사용자 아바타 업데이트 시 "CSRF 토큰의 진위를 확인할 수 없습니다" 오류 발생

여기서도 비슷한 문제가 발생합니다 - Cant update email via API - invalid_access error

서버 로그에서 확인되는 내용:

Started PUT "/u/brodie-16/preferences/avatar/pick.json" for 24.17.99.993 at 2022-09-08 10:28:10 +0000
Processing by UsersController#pick_avatar as JSON
  Parameters: {"upload_id"=>13, "type"=>"uploaded", "username"=>"pelican-16", "user"=>{}}
Can't verify CSRF token authenticity.
Completed 422 Unprocessable Entity in 34ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 6549)

내가 보내는 요청:

import requests
import json

url = "https://blah.blahblah.blah/u/brodie-16/preferences/avatar/pick.json"

payload = json.dumps({
  "upload_id": 13,
  "type": "uploaded"
})
headers = {
  'Api-Key': 'blahblahblahblahhhhh',
  'Api-Username': 'system',
}

response = requests.request("PUT", url, headers=headers, json=payload)

print(response.text)

API에서 받는 응답:

{
    "failed": "FAILED"
}

로드 밸런서/프록시 관련 문제가 아니라는 것은 알고 있습니다. Discourse를 실행 중인 인스턴스에서 로컬로 요청해도 작동하지 않기 때문입니다.

[root@ip-10-say-whatt-2 discourse]# curl --insecure --location --request PUT 'https://localhost/u/brodie-16/preferences/avatar/pick.json' \
> --header 'Api-Key: blahblah' \
> --header 'Api-Username: system' \
> --header 'Content-Type: application/json' \
> --data-raw '{
>     "upload_id": 13,
>     "type": "uploaded"
> }'
{"failed":"FAILED"}

최근 다른 사용자도 같은 문제를 게시했습니다 - Can't verify CSRF token authenticity while creating topics

무슨 일이 일어나고 있는지 아시는 분 계신가요?