Accessing the CSRF token on your front-end.
If you need to submit a POST request to Django manually, you can import and use the following function to get an object containing a key-value pair representing the headers you would need to include in your request. Use the spread syntax to merge it with your other headers if necessary.
<script>
import { getCsrfTokenHeader } from '@common';
const tokenHeader = getCsrfTokenHeader();
</script>