Closed
Description
Support plan
- which support plan is this issue covered by? - Community
- is this issue currently blocking your project? No
- is this issue affecting a production system? Yes
Context
- node version: 12.14.1
- module version: Hapi 19.0.4
- environment (e.g. node, browser, native): node
- used with (e.g. hapi application, another framework, standalone, ...): Hapi with official plugins
- any other relevant information:
How can we help?
Hi everyone!
I was updating from Hapi 18.3 to 19.0.4 and want to set request.payload.multipart to true globally, for the all routes by default. I added to my server routes.payload.multipart: true.
But id doesn't work. Server returns 415 error when I try to post multipart data. When I set multipart to true in specific route options - it works fine.
this is my server config:
const config = {
host: host,
port: port,
state: {
// Fix for 'Error: Invalid cookie header'!
ignoreErrors: true,
},
routes: {
payload: {
multipart: true,
},
security: {
xframe: {
rule: 'allow-from',
source: '*',
},
},
},
}
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
phattranky commentedon Feb 6, 2020
Look like this is same my issue at #4042
Marsup commentedon Feb 6, 2020
This is due to
hapi/lib/config.js
Line 149 in c3cc6a1
@hueniverse shouldn't that strip
false
values instead?Allow global multipart. Closes hapijs#4027