mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-05-18 12:53: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" {
|
||||
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
|
||||
|
||||
@@ -28,7 +28,6 @@ main {
|
||||
footer {
|
||||
margin-top: 3em;
|
||||
border-top: 1px solid #ddd;
|
||||
padding-bottom: 2em;
|
||||
text-align: center;
|
||||
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