mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-23 00:33:46 +02:00
Add csrf component
This commit is contained in:
@@ -30,6 +30,7 @@ let token = document.head.querySelector('meta[name="csrf-token"]');
|
||||
|
||||
if (token) {
|
||||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
||||
window.X_CSRF_TOKEN = token.content;
|
||||
} else {
|
||||
console.error('CSRF token not found in document.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user