mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
Show _all_ Request Headers in CSRF_DEBUG view
the less relevant ones grayed out This may help in debugging #100
This commit is contained in:
@@ -217,11 +217,10 @@ def csrf_debug(request):
|
||||
"posted": True,
|
||||
"POST": request.POST,
|
||||
"META": {
|
||||
k: request.META.get(k) for k in [
|
||||
"HTTP_ORIGIN",
|
||||
"HTTP_REFERER",
|
||||
]
|
||||
k: request.META.get(k) for k in request.META.keys() if k.startswith("HTTP_")
|
||||
},
|
||||
"SECURE_PROXY_SSL_HEADER": settings.SECURE_PROXY_SSL_HEADER[0] if settings.SECURE_PROXY_SSL_HEADER else None,
|
||||
|
||||
"process_view": _process_view_steps(middleware, request, context),
|
||||
})
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
</form>
|
||||
{% else %}
|
||||
|
||||
<h2 class="text-2xl font-bold mt-4">META</h2>
|
||||
<h2 class="text-2xl font-bold mt-4">Request Headers (META)</h2>
|
||||
{% for key, value in META|items %}
|
||||
<div class="flex {% if forloop.first %}border-slate-300 border-t-2{% endif %}">
|
||||
<div class="flex {% if forloop.first %}border-slate-300 border-t-2{% endif %} {% if key == "HTTP_ORIGIN" or key == "HTTP_REFERER" or key == SECURE_PROXY_SSL_HEADER %}text-black{% else %}text-slate-300{% endif %}">
|
||||
<div class="w-1/4 {% if not forloop.last %}border-b-2 border-dotted border-slate-300{% endif %}">{{ key }}</div>
|
||||
<div class="w-3/4 {% if not forloop.last %} border-b-2 border-dotted border-slate-300{% endif %} font-mono">{{ value }}</div>
|
||||
</div>
|
||||
|
||||
2
theme/static/css/dist/styles.css
vendored
2
theme/static/css/dist/styles.css
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user