HttpResponse を呼び出して、django ビューに応答オブジェクトを作成しました。
myResponse = HttpResponse("Here is some text")
そして、応答の Access-Control-Allow-Credentials ヘッダーを true に設定したいと考えています。他のヘッダーの場合と同様に、これを python 文字列で設定する必要があります
myResponse['Access-Control-Allow-Credentials'] = 'true'
またはpythonブール値で
myResponse['Access-Control-Allow-Credentials'] = True
またはどちらかが動作しますか?(そして、両方が技術的に機能する場合、もう1つは「正しい」です)