kyma
kyma copied to clipboard
nodejs function runtimes are ignoring all bodyparsers except of raw
Hi, i have tested this a little bit and the issue was already present in kubless afaik.
when the body parsers are used in this order (with the current podyParserOptions), then the raw parser will always win and the other parsers are basically ignored.
we have already implemented against the issue, by parsing event.extensions.request.body
so a change in those lines will most likely break already defined functions.
basically every request (except of multipart), according to
https://github.com/kyma-project/kyma/blob/c23dcfd024c9c8d9191885465742d79ea53bc54d/components/function-runtimes/nodejs12/kubeless/kubeless_rt/kubeless.js#L35-L38
will be parsed as raw, because of the ordering here:
https://github.com/kyma-project/kyma/blob/c23dcfd024c9c8d9191885465742d79ea53bc54d/components/function-runtimes/nodejs16/server.js#L64-L66
https://github.com/kyma-project/kyma/blob/c23dcfd024c9c8d9191885465742d79ea53bc54d/components/function-runtimes/nodejs14/kubeless/kubeless_rt/kubeless.js#L40-L42
https://github.com/kyma-project/kyma/blob/c23dcfd024c9c8d9191885465742d79ea53bc54d/components/function-runtimes/nodejs12/kubeless/kubeless_rt/kubeless.js#L39-L41