Use hostname for download filename

This commit is contained in:
Jamil Bou Kheir
2021-12-15 15:49:53 -08:00
parent 9452d943ce
commit a9dbdb96e4

View File

@@ -16,7 +16,7 @@ defmodule FzHttpWeb.DeviceController do
def download_config(conn, %{"id" => device_id}) do
device = Devices.get_device!(device_id)
filename = "#{sanitize_filename(device.name)}.conf"
filename = "#{sanitize_filename(FzHttpWeb.Endpoint.host())}.conf"
content_type = "text/plain"
conn