Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2016-02-02 16:01:52

nuttybrewer
Member
Registered: 2016-02-02
Posts: 2

GTalk/XMPP using IP address of instead of host name when configuring

I am trying to get the OAuth for Gtalk working.

I am hosting the LHC application behind a reverse-proxy (mod_proxy on Apache).

In the configuration screen (Home->System Settings -> XMPP Settings->Use GTalk for messaging)
The Redirect URL shows the IP address of the box instead of the hostname (I'm  hosting on internal IP on port 8080).

It's not a problem, I changed the hostname portion of the URL in the google dev console.

When I click on "Grant Permission to send a message" it looks like it's submitting the redirect URL with the local IP:8080 which is not what I want.

Is this a bug, of a mis-configuration of my web container? (I'm using nginx).

Offline

#2 2016-02-02 19:41:57

nuttybrewer
Member
Registered: 2016-02-02
Posts: 2

Re: GTalk/XMPP using IP address of instead of host name when configuring

Ok, so lots of digging in the code. it's using the $_SERVER['HTTP_HOST'] header in the request (not sure this is a good idea but that's another discussion).

So, the answer is, since we're using mod_proxy on the SSL_terminator, in the <VirtualHost> tag for this particular server, simple set ProxyPreserveHost On and it seems to fix the problem.

Offline

#3 2016-02-02 20:23:00

PeopleInside
Administrator
From: Italy
Registered: 2014-04-10
Posts: 4,046
Website

Re: GTalk/XMPP using IP address of instead of host name when configuring

Thank you for posting your question in the live helper chat forum!


lol PeopleInside - Live helper chat - free limited forum support!
wink For commercial support or GitHub [see FAQ here]
ops If you want to support this open source project, just donate [see support page]
glasses Something wrong with the forum? [contact a superhero]

Offline

Board footer