fix: added back csrf_token
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.getElementById('seo-content').style.display = 'none';
|
document.getElementById('seo-content').style.display = 'none';
|
||||||
|
window.csrf_token = '{{ csrf_token }}'
|
||||||
</script>
|
</script>
|
||||||
<script type="module" src="/src/main.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -15,8 +15,11 @@ def get_context():
|
|||||||
or "/assets/lms/frontend/favicon.png"
|
or "/assets/lms/frontend/favicon.png"
|
||||||
)
|
)
|
||||||
title = frappe.db.get_single_value("Website Settings", "app_name") or "Frappe Learning"
|
title = frappe.db.get_single_value("Website Settings", "app_name") or "Frappe Learning"
|
||||||
|
csrf_token = frappe.sessions.get_csrf_token()
|
||||||
|
frappe.db.commit()
|
||||||
|
|
||||||
context = frappe._dict()
|
context = frappe._dict()
|
||||||
|
context.csrf_token = csrf_token
|
||||||
context.meta = get_meta(app_path, title, favicon)
|
context.meta = get_meta(app_path, title, favicon)
|
||||||
capture("active_site", "lms")
|
capture("active_site", "lms")
|
||||||
context.title = title
|
context.title = title
|
||||||
|
|||||||
Reference in New Issue
Block a user