Commit f667b8c
committed
fix(api): allow POST requests without Content-Type header when body is empty
Previously, all POST requests required 'Content-Type: application/json' header,
even when the request body was empty. This caused issues with endpoints like
/api/monitor/ where parameters can be passed via URL instead of body.
Now the Content-Type check is only enforced when a Content-Type header is
actually provided, allowing empty-body POST requests to work correctly.1 parent 20eff13 commit f667b8c
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
| 155 | + | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
0 commit comments