Use SiteUrl for cli response

This commit is contained in:
Kieran 2023-05-11 19:12:09 +01:00
parent ddab98ca14
commit b46cd39849
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -120,9 +120,10 @@ namespace VoidCat.Controllers
if (cli) if (cli)
{ {
var urlBuilder = new UriBuilder(Request.IsHttps ? "https" : "http", Request.Host.Host, var urlBuilder = new UriBuilder(_settings.SiteUrl)
Request.Host.Port ?? 80, {
$"/d/{vf.Id.ToBase58()}"); Path = $"/d/{vf.Id.ToBase58()}"
};
return Content(urlBuilder.Uri.ToString(), "text/plain"); return Content(urlBuilder.Uri.ToString(), "text/plain");
} }