Commit 8e15e7d
authored
LEGLINK-951: Return 404 from DMRP endpoints when the module is disabled (#1817)
The Tenant build emits [assembly: ApplicationPart(DMRP)] for the DMRP
project reference, so AddControllers() discovered the module's
controllers even when DMRP:Enabled was false or missing. With no DMRP
services registered, activating those controllers threw
InvalidOperationException and every DMRP request returned 500.
AddDmrpModule now strips the module's application part when the flag is
off, so the routes are never mapped and requests fall through to 404.
Claude-Session: https://claude.ai/code/session_01LVVXQjfgjXC4WwHtciJYEJ1 parent 68b2842 commit 8e15e7d
2 files changed
Lines changed: 35 additions & 0 deletions
File tree
- DotNet
- DMRP/DependencyInjection
- ServiceTests/UnitTests/DMRP
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
148 | 173 | | |
149 | 174 | | |
0 commit comments