Files
astuto/app/javascript/helpers/buildRequestHeaders.ts

7 lines
242 B
TypeScript
Raw Normal View History

2025-01-22 09:55:36 +01:00
const buildRequestHeaders = (authenticityToken: string, contentType: string = 'application/json') => ({
Accept: 'application/json',
2025-01-22 09:55:36 +01:00
'Content-Type': contentType,
'X-CSRF-Token': authenticityToken,
});
export default buildRequestHeaders;