Commit d30f912f authored by David Seaward's avatar David Seaward Committed by Gogs
Browse files

Merge branch 'ovpn_as_download' of david.seaward/purist_middleware into master

parents ec5bd265 ea9b4508
......@@ -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
Supports Markdown
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