Bypass domain check for localhost

This commit is contained in:
pcjones
2024-11-02 15:51:05 +01:00
parent 6fc399131b
commit c581233dbf

View File

@@ -13,7 +13,7 @@ namespace UmlautAdaptarr.Controllers
[HttpGet] [HttpGet]
public async Task<IActionResult> Caps([FromRoute] string options, [FromRoute] string domain, [FromQuery] string? apikey) public async Task<IActionResult> Caps([FromRoute] string options, [FromRoute] string domain, [FromQuery] string? apikey)
{ {
if (!UrlUtilities.IsValidDomain(domain)) if (!domain.StartsWith("localhost") && !UrlUtilities.IsValidDomain(domain))
{ {
return NotFound($"{domain} is not a valid URL."); return NotFound($"{domain} is not a valid URL.");
} }