Hi everyone,
I’m updating a project from dfx
version 0.22.0 to 0.24.3, and I’ve run into an issue where my PATCH HTTP methods no longer work. When I try to send a PATCH request, I receive a 405 Method Not Allowed error with the following response:
Response {
[Symbol(realm)]: null,
[Symbol(state)]: {
aborted: false,
rangeRequested: false,
timingAllowPassed: true,
requestIncludesCredentials: true,
type: 'default',
status: 405,
timingInfo: {
startTime: 2071.70838,
redirectStartTime: 0,
redirectEndTime: 0,
postRedirectStartTime: 2071.70838,
finalServiceWorkerStartTime: 0,
finalNetworkResponseStartTime: 0,
finalNetworkRequestStartTime: 0,
endTime: 0,
encodedBodySize: 0,
decodedBodySize: 0,
finalConnectionTimingInfo: null
},
cacheState: '',
statusText: 'Method Not Allowed',
headersList: HeadersList {
cookies: null,
[Symbol(headers map)]: [Map],
[Symbol(headers map sorted)]: null
},
urlList: [ URL {} ],
body: { stream: undefined }
},
[Symbol(headers)]: HeadersList {
cookies: null,
[Symbol(headers map)]: Map(6) {
'vary' => [Object],
'access-control-allow-origin' => [Object],
'access-control-expose-headers' => [Object],
'allow' => [Object],
'content-length' => [Object],
'date' => [Object]
},
[Symbol(headers map sorted)]: null
}
}
What I’ve Tried So Far:
- Tested intermediate versions:
- 0.23.0, 0.24.0, 0.24.1: These versions fail with completely different errors for most of my HTTP methods, so I didn’t dive into those issues.
- 0.24.2: Same 405 error as 0.24.3.
- Checked for breaking changes in the changelogs, but nothing jumped out as a direct cause.
My Questions:
- Has anyone else encountered issues with HTTP methods (particularly PATCH) in these versions?
- Were there any changes in how
dfx
handles HTTP methods or service worker configurations between these versions?
I’d appreciate any insights or suggestions. Thanks in advance!