1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-23 17:07:42 +01:00

change qs from domain to url

This commit is contained in:
Kyle Spearrin 2017-10-09 16:21:37 -04:00
parent 02c4bb3037
commit 2c21e3e100

View File

@ -27,19 +27,19 @@ namespace Bit.Icons.Controllers
}
[HttpGet("")]
public async Task<IActionResult> Get([FromQuery]string domain)
public async Task<IActionResult> Get([FromQuery]string url)
{
if(string.IsNullOrWhiteSpace(domain))
if(string.IsNullOrWhiteSpace(url))
{
return new BadRequestResult();
}
if(!domain.StartsWith("http://") || !domain.StartsWith("https://"))
if(!url.StartsWith("http://") || !url.StartsWith("https://"))
{
domain = "http://" + domain;
url = "http://" + url;
}
if(!Uri.TryCreate(domain, UriKind.Absolute, out Uri uri))
if(!Uri.TryCreate(url, UriKind.Absolute, out Uri uri))
{
return new BadRequestResult();
}