Files
astuto/app/javascript/helpers/buildRequestHeaders.ts
2025-01-22 09:55:36 +01:00

7 lines
242 B
TypeScript

const buildRequestHeaders = (authenticityToken: string, contentType: string = 'application/json') => ({
Accept: 'application/json',
'Content-Type': contentType,
'X-CSRF-Token': authenticityToken,
});
export default buildRequestHeaders;