Skip to content

CSRF on Deployment Config #39

@radah19

Description

@radah19

I did not know CSRF tokens were not working on deployment 😭 I attempted doing debugging in multiple ways but couldn't figure it out - so I added a bunch of @csrf-exempt tags to all the Django views for now:

@csrf_exempt
def vibe_rooms(request):
  ...

@csrf_exempt
def vibe_room_user_id(request, username):
   ...

@csrf_exempt
def vibe_room_room_id(request, room_id):
   ...

@csrf_exempt
def vibe_room_update_room_id(request, room_id):
  ...

@csrf_exempt
def song(request, room_id):
    ...

@csrf_exempt
def media(request, room_id):
   ...

@csrf_exempt
def edit_media(request, media_id):
    ...

@csrf_exempt is fine to keep on the create_account and auth functions as those functions generate CSRF tokens. After a fix is found though, someone should remove all these exempts...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions