Back

Getting IP headers in functions from proxies when calling with createExecution

  • 0
  • Functions
Expo
10 Mar, 2024, 16:04

Right now, I cannot figure out how to get the X-Forwarded-For and [insert the header my proxy uses for specifically the client's ip here] headers when the function is called with functions.createExecution. Is there any way I can get the client IP when the function is created from createExecution rather than a regular http request? And is there any way I can specify which headers should just be passed through to the function from the original request (that are added by my proxy)?

As of now, the client can just say "yeah my ip is 1.2.3.4" when its actually 2.3.4.5 (example ips ofc) by simply calling createExecution with those headers - or it can just pretend not to have an IP. I'm not sure how I should fix this.

TL;DR
Developers are trying to get IP headers like X-Forwarded-For when using `createExecution` with proxies. They want to ensure the correct client IP is obtained and avoid spoofing. To address this, developers can modify their proxy settings to pass through specific headers to the function or look into other options for authenticating client IPs.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more