Comments (2)
Hi @sooluh that's a great suggestion for discussions. I've enabled it here https://github.com/pbojinov/request-ip/discussions
As far as AdonisJS, I haven't personally tested used this web framework but I assume it should work as long as it supports one of the methods described here – https://github.com/pbojinov/request-ip#how-it-works
from request-ip.
Hi @pbojinov, thanks for the response.
About this question, I've tried it in AdonisJS, and yes it works, but it's not enough to pass the request argument from AdonisJS to the getClientIp()
method.
Because in AdonisJS, the http context received from the request object is a method-based object, so we have to change it first to JSON, fortunately in AdonisJS itself has a toJSON()
method in the request object, so at least it's easier.
We need to pass request.toJSON()
to the getClientIp()
method, because after I review the code of this module, it uses request.headers
(not a method), but in AdonisJS to get headers, we need to use request.headers()
method, or for values from the header specifically, we use request.header('key')
.
Thanks, I will close this issue.
from request-ip.
Related Issues (20)
- Mac address instead of IP HOT 1
- Not working correctly on deployed App HOT 1
- Add support for Cloudflare's "Cf-Pseudo-IPv4" header (as a last resort) HOT 1
- Wrong IP if proxied via CloudFlare HOT 9
- IP is null, request to firebase emulator from within website iframe
- Switch to Typescript from ES6 HOT 1
- Look into migrating tests from Tape to Jest
- ::ffff:127.0.0.1 Address from client on same VPN as application HOT 1
- Wrong Client Ip address been picked in your recent version HOT 3
- Bad extract ip from x-forwarded-for HOT 8
- Incompatible with Next.js middleware/Vercel edge functions HOT 2
- Error: Cannot find module './is' HOT 12
- RFC-7239 "Forwarded" header not properly supported HOT 2
- How to get IPv4 address only? HOT 4
- Add prioritize option for header check order HOT 1
- is.js ReDoS Vulnerability HOT 2
- (node:71664) [FSTDEP005] FastifyDeprecation "request.connection" HOT 3
- Is v3.3.0 released? HOT 1
- lib/index.js is not up to date in master branch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from request-ip.