Skip to content
This repository has been archived by the owner on Feb 6, 2018. It is now read-only.

Add headers and remote IP #105

Closed
marshallswain opened this issue Apr 10, 2017 · 0 comments
Closed

Add headers and remote IP #105

marshallswain opened this issue Apr 10, 2017 · 0 comments

Comments

@marshallswain
Copy link
Member

This is too common of a request to not be next on the list. There are a lot of headers that match between the transports: https://gist.github.com/marshallswain/b775c7b6d7a9b2429b0eb6fe669a2bfd

Currently the auth plugin has the expose-headers middleware, but I think we should move it here and and the remote IP address on the feathers object, as well.

app.use(function (req, res, next) {
  req.feathers.headers = req.headers;
  req.feathers.ip = req.ip;
  next();
});
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant