moleculerjs / moleculer-web

:earth_africa: Official API Gateway service for Moleculer framework
http://moleculer.services/docs/moleculer-web.html
MIT License
292 stars 120 forks source link

Response headers affectation #323

Closed furanzujin closed 1 year ago

furanzujin commented 1 year ago

Hello,

We encountered a crash of the HTTP gateway during the assignment of the response headers. This error occurred because of invalid characters in one of the header keys.

Several ways have been identified to avoid this crash:

However, we believe that crashes could be avoided more globally by securing the sendResponse and sendError processes.

Do you want us to propose a change to the moleculer-web component to implement these operations? If so, we would like to include a log (warn or error) and skip the assignment of the problematic header.

Would this be acceptable to you?

icebob commented 1 year ago

Yeah, please create a PR with your proposed fix.

furanzujin commented 1 year ago

Hello @icebob,

Sorry for the delay; you'll find a pull request here to avoid process crashes on invalid header character assignments.