7 lines
319 B
JavaScript
7 lines
319 B
JavaScript
// Reads the CSRF token from the standard <meta name="csrf-token"> tag every
|
|
// boboko host renders in its layout <head>. Kept as its own module so both
|
|
// checkout controllers share one source.
|
|
export function csrfToken() {
|
|
return document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') || ''
|
|
}
|