Skip to content

Commit 20bcfe9

Browse files
committed
feat: prepend '/' to MapPath
1 parent 6bbdce3 commit 20bcfe9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Prometheus.Client.AspNetCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>ASP.NET Core middleware for the Prometheus.Client</Description>
4-
<VersionPrefix>4.7.0</VersionPrefix>
4+
<VersionPrefix>4.8.0</VersionPrefix>
55
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
66
<PackageId>Prometheus.Client.AspNetCore</PackageId>
77
<RepositoryUrl>https://github.com/prom-client-net/prom-client-aspnetcore</RepositoryUrl>

src/PrometheusExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static IApplicationBuilder UsePrometheusServer(this IApplicationBuilder a
3737
throw new ArgumentNullException(nameof(options));
3838

3939
if (!options.MapPath.StartsWith("/"))
40-
throw new ArgumentException($"MapPath '{options.MapPath}' should start with '/'");
40+
options.MapPath = "/" + options.MapPath;
4141

4242
if (options.UseDefaultCollectors)
4343
{

0 commit comments

Comments
 (0)