Commit 6d454a2e authored by David Seaward's avatar David Seaward

signal that the OVPN file should be download not opened as a page

parent 92ae9848
......@@ -42,4 +42,6 @@ def ovpn_userfile(request):
user_identity = request.user.get_identity()
filepath = settings.OVPN_FILEPATH.replace("{USER_IDENTITY}", user_identity)
return FileResponse(open(filepath, 'rb'))
response = FileResponse(open(filepath, 'rb'), content_type='application/octet-stream')
response['Content-Disposition'] = 'attachment; filename="purist.ovpn"'
return response
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment