processone / ejabberd-contrib

Growing and curated ejabberd contributions repository - PR or ask to join !
http://ejabberd.im
250 stars 137 forks source link

Is it possible to get WAN IP through HTTP authentication module #247

Closed adiii717 closed 6 years ago

adiii717 commented 6 years ago

I am trying to get WAN IP in my auth server but when I tried to get IP from request its return localhost IP or IP of the machine where ejabberd is running. Is there any way to pass original IP to HTTP auth server to get IP of the original request or can we pass X-Forwarded-For to auth server?

The documentation mentions something like

connection_opts (optional, default: []) - extra options for hackers: http://erlang.org/doc/man/gen_tcp.html#type-connect_option

But not further explanation connection_opts.

ejabberd_auth_http Thanks.

badlop commented 6 years ago

Apparently nobody could answer this question.