Set content-type for config to avoid .txt suffixes on some devices

This commit is contained in:
Daniel Lundin
2019-10-09 13:17:22 +02:00
parent 2c046634ff
commit 8fae238166
3 changed files with 1 additions and 1 deletions
+1
View File
@@ -457,6 +457,7 @@ Endpoint = %s
if format == "config" {
filename := fmt.Sprintf("%s.conf", client.Name)
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
w.Header().Set("Content-Type", "application/config")
w.WriteHeader(http.StatusOK)
fmt.Fprintf(w, configData)
return
-1
View File
@@ -28,7 +28,6 @@ main {
footer {
margin-top: 3em;
border-top: 1px solid #ddd;
padding-bottom: 2em;
text-align: center;
background: #f7f7f7;
}
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 105 KiB