Commit 86cf3e4
committed
VPR-54 fix(scheduler): render Razor 403 view for dashboard auth denials
Hangfire's dashboard middleware writes a bare 403 directly to the
response when our IDashboardAuthorizationFilter returns false, which
bypasses cookie auth's AccessDeniedPath and lands the user on the
browser's default error page. Add UseStatusCodePagesWithReExecute so
any bare 4xx/5xx status code re-runs through HomeController.Error and
the existing /Views/Home/403.cshtml view.
Applies globally — also catches stray bare 404s from any other
middleware. Status code is preserved on the response (browser still
sees 403); only the body is replaced with the rendered view.1 parent 722ca6d commit 86cf3e4
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
391 | 396 | | |
392 | 397 | | |
393 | 398 | | |
| |||
0 commit comments