diff --git a/app/templates/widgets/editor.html b/app/templates/widgets/editor.html index 7c641ad..c4dc0a4 100644 --- a/app/templates/widgets/editor.html +++ b/app/templates/widgets/editor.html @@ -24,7 +24,10 @@ data = {text: plainText}; fetch('{{ url_for("api_markdown") }}', { method: "POST", - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + 'X-CSRFToken': '{{ csrf_token() }}' + }, body: JSON.stringify(data) }) .then(response => response.text())