Make HTTPS redirection optional and remove authorization

- HTTPS redirection now configurable via ENABLE_HTTPS_REDIRECTION env var
- Removed UseAuthorization() for Docker flexibility
- Improved regex group validation in ScrapingService
This commit is contained in:
2025-12-07 11:29:59 +10:00
parent 86ff2c6f66
commit f6366bf346
2 changed files with 14 additions and 3 deletions
+3 -1
View File
@@ -124,8 +124,10 @@ public class ScrapingService : IScrapingService
if (!string.IsNullOrEmpty(summaryText))
{
// Parse "3 of 3 location results" or similar
// Pattern has 2 capture groups: (\d+) of (\d+)
// Groups[0] = full match, Groups[1] = first number, Groups[2] = second number (total)
var countMatch = System.Text.RegularExpressions.Regex.Match(summaryText, @"(\d+)\s+of\s+(\d+)", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
if (countMatch.Success && countMatch.Groups.Count >= 3)
if (countMatch.Success && countMatch.Groups.Count >= 3 && countMatch.Groups[2].Success)
{
if (int.TryParse(countMatch.Groups[2].Value, out var total))
{