yuzd / Hangfire.HttpJob

httpjob for Hangfire,restful api for Hangfire,job调度与业务分离
https://github.com/yuzd/Hangfire.HttpJob/wiki
MIT License
618 stars 184 forks source link

解决hangfire部署后带前缀PrefixPath,部分请求url请求404问题 #183

Closed m344739968 closed 1 year ago

m344739968 commented 1 year ago

182

hangfire在某些情况需要部署在网关之后,可能网关域名相同,通过虚拟路径区分站点, hangfire dashboard无网关部署后地址:https://www.domain.com/hangfire,hangfire本身也支持 通过配置PrefixPath属性 app.UseHangfireDashboard("/hangfire", new DashboardOptions { PrefixPath = "/order" }); hangfire dashboard有网关部署后地址:https://www.domain.com/{PrefixPath}/hangfire, 但是Hangfire.HttpJob并不支持{PrefixPath}配置,导致部分请求地址404