mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-05-23 12:58:18 -05:00
Update chat view decorators
This commit is contained in:
parent
a83b9a3a4d
commit
a957c5f053
@ -1140,8 +1140,14 @@ class DocumentViewSet(
|
||||
)
|
||||
|
||||
|
||||
@method_decorator(ensure_csrf_cookie, name="dispatch")
|
||||
@method_decorator(login_required, name="dispatch")
|
||||
@method_decorator(
|
||||
[
|
||||
ensure_csrf_cookie,
|
||||
login_required,
|
||||
cache_control(no_cache=True),
|
||||
],
|
||||
name="dispatch",
|
||||
)
|
||||
class ChatStreamingView(View):
|
||||
def post(self, request):
|
||||
request.compress_exempt = True
|
||||
@ -1177,7 +1183,6 @@ class ChatStreamingView(View):
|
||||
stream_chat_with_documents(query_str=question, documents=documents),
|
||||
content_type="text/event-stream",
|
||||
)
|
||||
response["Cache-Control"] = "no-cache"
|
||||
return response
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user