fix: import preset not working behind nginx due to long url/csrf missing

This commit is contained in:
Herculino Trotta
2025-01-24 16:06:47 -03:00
parent dbea78cd3c
commit 97465c07fe
15 changed files with 12 additions and 45 deletions
@@ -20,7 +20,7 @@
{% for preset in presets %}
<a class="text-decoration-none"
role="button"
hx-get="{% url 'import_profiles_add' %}"
hx-post="{% url 'import_profiles_add' %}"
hx-vals='{"yaml_config": {{ preset.config }}, "name": "{{ preset.name }}", "version": "{{ preset.schema_version }}", "message": {{ preset.message }}}'
hx-target="#generic-offcanvas">
+2 -1
View File
@@ -28,7 +28,8 @@
<body class="font-monospace">
<div _="install hide_amounts
install htmx_error_handler
{% block body_hyperscript %}{% endblock %}">
{% block body_hyperscript %}{% endblock %}"
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
{% include 'includes/navbar.html' %}
<div id="content">