mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-05-18 21:03:30 +02:00
Set content-type for config to avoid .txt suffixes on some devices
This commit is contained in:
@@ -457,6 +457,7 @@ Endpoint = %s
|
|||||||
if format == "config" {
|
if format == "config" {
|
||||||
filename := fmt.Sprintf("%s.conf", client.Name)
|
filename := fmt.Sprintf("%s.conf", client.Name)
|
||||||
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
|
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"%s\"", filename))
|
||||||
|
w.Header().Set("Content-Type", "application/config")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
fmt.Fprintf(w, configData)
|
fmt.Fprintf(w, configData)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ main {
|
|||||||
footer {
|
footer {
|
||||||
margin-top: 3em;
|
margin-top: 3em;
|
||||||
border-top: 1px solid #ddd;
|
border-top: 1px solid #ddd;
|
||||||
padding-bottom: 2em;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: #f7f7f7;
|
background: #f7f7f7;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 105 KiB |
Reference in New Issue
Block a user