Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Pass Data to Fastboot through Middleware #17

Open
vkoves opened this issue Jan 6, 2017 · 4 comments
Open

Unable to Pass Data to Fastboot through Middleware #17

vkoves opened this issue Jan 6, 2017 · 4 comments

Comments

@vkoves
Copy link

vkoves commented Jan 6, 2017

I was working on a feature that used an npm package to get the IP address of a client conncting to the Fastboot server, which was configured as a middleware in fastboot-server.js, which initializes Fastboot using this middleware. However, it appears that there is no way to pass data to Fastboot through fastboot-express-middleware, which makes it very challenging to extend Fastboot using other middlewares.

Let me know if you need more information about my use case, but overall I think it would be important to maintain modularity by allowing information to be passed into Fastboot through this middleware.

@lukeclewlow
Copy link

Can't you pass through on the request object? If you add something to the request, you also have access to that within your fastboot ember application. Not sure if i'm getting the wrong end of the stick about the use case though.

@joshkg
Copy link

joshkg commented Mar 22, 2018

@vkoves Were you able to figure this one out? I'm in a position where I need to pass the IP address of the client into fastboot as well!

@vkoves
Copy link
Author

vkoves commented Mar 22, 2018

@joshkg This was a while ago, I think we weren't able to do it and didn't do anything further with this.

@viniciussbs
Copy link

It looks like the this.fastboot.request is an object with some informations extracted from Express' request. It's not Express' request object itself.

In my case, I would like to know if the request was made from a mobile browser. I already have req.useragent.isMobile working on my server, but I can't access this information running this.fastboot.request.useragent.isMobile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants