pieceofsummer / Hangfire.Console

Job console extension for Hangfire
MIT License
436 stars 80 forks source link

Progress endpoint won't respect PrefixPath defined in dashboard UI #125

Open eCorke opened 1 year ago

eCorke commented 1 year ago

It seems that progress circular loading that's shown in overview of running tasks (for each row) doesn't respect PrefixPath defined in dashboard registration. The repeated requests towards hangfire/console/progress is never prefixed.

As in my case, the dashboard is exposed on sub address (https://localhost:6001/application/hangfire...) with PrefixPath defined as application, the progress requests point to https://localhost:6001/hangfire/console/progress

khellang commented 1 year ago

The code just uses default Hangfire APIs to register dashboard routes:

https://github.com/pieceofsummer/Hangfire.Console/blob/a1fea1356c46fe70b0a9df1785cf5c138aa18ae0/src/Hangfire.Console/GlobalConfigurationExtensions.cs#L44-L46

I think this might be a bug in Hangfire itself?

AnderssonPeter commented 11 months ago

@khellang I saw that you created a fork of this repository, I have a nuget package that extends this one and was thinking about creating 2 additional nugets that target your fork. Is it ok if I named them IdentityStream.Hangfire.Console.Extensions and IdentityStream.Hangfire.Console.Extensions.Serilog? (If it's your company name I fully understand if your not OK with it!!)

https://github.com/AnderssonPeter/Hangfire.Console.Extensions https://www.nuget.org/packages/Hangfire.Console.Extensions https://www.nuget.org/packages/Hangfire.Console.Extensions.Serilog

khellang commented 11 months ago

I'm not totally opposed to it, but the IdentityStream.* prefix is reserved for my company's account on NuGet.org, so I'm not sure how doable it is. Any other suggestions? 😆

AnderssonPeter commented 11 months ago

If that is the case how about Hangfire.Console.Extensions.IdentityStream and Hangfire.Console.Extensions.Serilog.IdentityStream?

khellang commented 11 months ago

Yeah, that's fine 👍🏻

AnderssonPeter commented 11 months ago

@khellang seems like anything with the name IdentityStream in it is reserved. How about if you create a API Key that only allows me to push IdentityStream.Hangfire.Console.*? (You can specify a pattern when you create the key)

khellang commented 11 months ago

Hmm. That's weird. I wonder what part of "prefix" Microsoft doesn't get? 😆 The prefix is explicitly IdentityStream.*:

image

I'm not too keen on having packages we don't maintain sitting under the IdentityStream NuGet organization either 🤔

khellang commented 11 months ago

What about IdS.Hangfire.Console.Extensions or Hangfire.Console.Extensions.IdS? 😅