Skip to content

Commit

Permalink
feat: prepend '/' to MapPath
Browse files Browse the repository at this point in the history
  • Loading branch information
phnx47 committed Aug 27, 2022
1 parent 6bbdce3 commit 20bcfe9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Prometheus.Client.AspNetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>ASP.NET Core middleware for the Prometheus.Client</Description>
<VersionPrefix>4.7.0</VersionPrefix>
<VersionPrefix>4.8.0</VersionPrefix>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<PackageId>Prometheus.Client.AspNetCore</PackageId>
<RepositoryUrl>https://github.com/prom-client-net/prom-client-aspnetcore</RepositoryUrl>
Expand Down
2 changes: 1 addition & 1 deletion src/PrometheusExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static IApplicationBuilder UsePrometheusServer(this IApplicationBuilder a
throw new ArgumentNullException(nameof(options));

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

if (options.UseDefaultCollectors)
{
Expand Down

0 comments on commit 20bcfe9

Please sign in to comment.