mirror of
https://github.com/ansible/awx.git
synced 2026-10-30 22:16:19 -02:30
show exceptions in plain text, not HTML
This commit is contained in:
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import traceback
|
||||
from django.http import HttpResponse
|
||||
|
||||
class ExceptionMiddleware(object):
|
||||
|
||||
def process_exception(self, request, exception):
|
||||
return HttpResponse(traceback.format_exc(exception), content_type="text/plain", status=500)
|
||||
|
||||
Reference in New Issue
Block a user