Describe the problem
Not all requests will have the header specified. E.g. on render.com when doing a health-check the service does an internal request. This will crash the server because the header is not present.
Describe the proposed solution
Get rid of this code: https://github.com/ivanhofer/kit/blob/export-SubmitFunction/packages/adapter-node/src/handler.js#L94-L100
This would be a breaking change as someone might rely on this error.
An option would also be to make this error throw configurable via an adapter option.
Alternatives considered
Require users to patch the getClientAddress functionality by themself.
As a workaround I currently do this in the first line of the handle function:
event.getClientAddress = () => request.headers.get('cf-connecting-ip')
Importance
would make my life easier
Additional Information
No response
Describe the problem
Not all requests will have the header specified. E.g. on
render.comwhen doing a health-check the service does an internal request. This will crash the server because the header is not present.Describe the proposed solution
Get rid of this code: https://github.com/ivanhofer/kit/blob/export-SubmitFunction/packages/adapter-node/src/handler.js#L94-L100
This would be a breaking change as someone might rely on this error.
An option would also be to make this error throw configurable via an adapter option.
Alternatives considered
Require users to patch the
getClientAddressfunctionality by themself.As a workaround I currently do this in the first line of the
handlefunction:Importance
would make my life easier
Additional Information
No response