mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-11 01:43:23 +01:00
c60254aca1
Update core libraries.
16 lines
399 B
TypeScript
16 lines
399 B
TypeScript
export const getCsrfToken = (): string | null => {
|
|
const meta = document.head.querySelector('meta[name="_csrf"]');
|
|
if (!meta) {
|
|
return '';
|
|
}
|
|
return meta.getAttribute('content');
|
|
};
|
|
|
|
export const getCsrfTokenParameter = (): string => {
|
|
const meta = document.head.querySelector('meta[name="_csrf_parameter"]');
|
|
if (!meta) {
|
|
return '';
|
|
}
|
|
return meta.getAttribute('content');
|
|
};
|