Skip to content

Commit 0beb46b

Browse files
committed
Respond to /resizer.license and /resizer.debug as well, so we don't have to try multiple endpoints.
1 parent e51b8a3 commit 0beb46b

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/Imageflow.Server/DiagnosticsPage.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ internal DiagnosticsPage(ImageflowMiddlewareOptions options,IWebHostEnvironment
3737
this.blobProviders = blobProviders;
3838
}
3939

40-
public static bool MatchesPath(string path) => "/imageflow.debug".Equals(path, StringComparison.Ordinal);
40+
public static bool MatchesPath(string path) => "/imageflow.debug".Equals(path, StringComparison.Ordinal) ||
41+
"/resizer.debug".Equals(path, StringComparison.Ordinal);
4142

4243
private static bool IsLocalRequest(HttpContext context) =>
4344
context.Connection.RemoteIpAddress.Equals(context.Connection.LocalIpAddress) ||
@@ -224,4 +225,4 @@ public static string GetFileVersion(this Assembly a)
224225
return GetFirstAttribute<AssemblyFileVersionAttribute>(a)?.Version;
225226
}
226227
}
227-
}
228+
}

src/Imageflow.Server/LicensePage.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ namespace Imageflow.Server
1010
internal class LicensePage
1111
{
1212
private readonly ImageflowMiddlewareOptions options;
13-
13+
1414
internal LicensePage(ImageflowMiddlewareOptions options)
1515
{
1616
this.options = options;
1717
}
1818

19-
public bool MatchesPath(string path) => "/imageflow.license".Equals(path, StringComparison.Ordinal);
19+
public bool MatchesPath(string path) => "/imageflow.license".Equals(path, StringComparison.Ordinal)
20+
|| "/resizer.license".Equals(path, StringComparison.Ordinal);
2021

2122
public async Task Invoke(HttpContext context)
2223
{
@@ -42,4 +43,4 @@ private Task<string> GeneratePage(HttpContext context)
4243

4344
}
4445

45-
}
46+
}

0 commit comments

Comments
 (0)