Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Seaward
Keel - LDH Middleware
Commits
6d454a2e
Commit
6d454a2e
authored
Oct 17, 2017
by
David Seaward
Browse files
signal that the OVPN file should be download not opened as a page
parent
92ae9848
Changes
1
Hide whitespace changes
Inline
Side-by-side
limitmonitor/views.py
View file @
6d454a2e
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment