i18next / i18next-express-middleware

[deprecated] can be replaced with i18next-http-middleware
https://github.com/i18next/i18next-http-middleware
MIT License
206 stars 52 forks source link

Remove Express alias of res.setHeader #199

Closed isaachinman closed 4 years ago

isaachinman commented 4 years ago

Following https://github.com/i18next/i18next-express-middleware/pull/191#issuecomment-561175320, it appears we can support non-Express use with connect and https by simply removing these two Express res.set calls. The res.set alias is identical to the vanilla res.setHeader.

This PR should be completely transparent to existing users, but will allow new users to opt out of Express.

It should be noted that due to lack of test coverage in this repo, there may indeed be other Express syntax problems that we have not discovered yet. Future bug reports by non-Express users may reveal these sorts of problems.

Also - we might at some point want to change the naming here to just i18next-middleware?

jamuhl commented 4 years ago

thank you - published in i18next-express-middleware@1.9.0