Skip to content

Commit 16ae7e6

Browse files
committed
fix: #187 Add no-cache headers to ajax response
1 parent 73ce7a1 commit 16ae7e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ajax_select/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ def ajax_lookup(request, channel):
4646
} for item in instances
4747
])
4848

49-
return HttpResponse(results, content_type='application/json')
49+
response = HttpResponse(results, content_type='application/json')
50+
response['Cache-Control'] = 'max-age=0, must-revalidate, no-store, no-cache;'
51+
return response

0 commit comments

Comments
 (0)