mirror of
https://github.com/bitwarden/server.git
synced 2024-11-22 12:15:36 +01:00
change qs from domain
to url
This commit is contained in:
parent
02c4bb3037
commit
2c21e3e100
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user