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

Allow The Lounge to be proxied behind a /path/ url #27

Merged
merged 1 commit into from Feb 18, 2016
Merged

Allow The Lounge to be proxied behind a /path/ url #27

merged 1 commit into from Feb 18, 2016

Conversation

gdamjan
Copy link
Contributor

@gdamjan gdamjan commented Feb 13, 2016

contains three small changes to use relative urls instead of absolute rooted at /

  • favicons in index.html
  • badge and pop sound in lounge.js
  • the url for the socket.io endpoint

Typical use with nginx:

  location /path/ {
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_pass http://localhost:9000/;
  }

those trailing / are important.

contains three small changes to use relative urls instead of absolute rooted at /

* favicons in index.html
* badge and pop sound in lounge.js
* the url for the socket.io endpoint

Typical use with nginx:

    location /path/ {
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_pass http://localhost:9000/;
    }

those trailing / are important.
@astorije
Copy link
Member

FYI, this is a rework of #3 and #20 (after it was reverted in #21).

@astorije astorije added the Type: Feature Tickets that describe a desired feature or PRs that add them to the project. label Feb 13, 2016
@astorije
Copy link
Member

As mentioned on the IRC channel, I have concerns about this change.
In particular, we should completely ensure that the existing solution fully works after your change.
So that would be great if someone could test running The Lounge under the following schemes:

(Checking these as per @JocelynDelalande's tests)

@xPaw
Copy link
Member

xPaw commented Feb 14, 2016

@astorije pathname would be as follows:

  1. /lounge, and in this case, yes, it will break.
  2. /
  3. /

@astorije
Copy link
Member

Indeed, but we cannot release this without actually testing, with the risk of breaking The Lounge for everyone as #3 / #20 did.

@gdamjan
Copy link
Contributor Author

gdamjan commented Feb 14, 2016

/lounge will break with or without my patch, ain't it?

@astorije
Copy link
Member

But I'm confused @gdamjan, wasn't that the purpose of your PR, to run The Lounge behind a /whatever path?

@gdamjan
Copy link
Contributor Author

gdamjan commented Feb 14, 2016

huh. ok. I'm not sure what you were asking, but the very important difference is /path vs /path/ (as I've specified in the commit message).

@astorije
Copy link
Member

Right, I see, sorry. I'm ok with the distinction, and wherever this gets documented or used, I'd suggest to add a redirect from /path to /path/ if possible.
Editing my checklist above.

@gdamjan
Copy link
Contributor Author

gdamjan commented Feb 14, 2016

with the above nginx rule, it'll send a redirect automatically.

@astorije
Copy link
Member

Good to know, thanks!

@gdamjan
Copy link
Contributor Author

gdamjan commented Feb 14, 2016

and to be extra clear... both of the trailing slashes are important, in location and in proxy_pass.

@astorije
Copy link
Member

Adding help wanted label, if someone can test the 3 scenarios listed above and report that would help shipping this faster. Thanks!

@JocelynDelalande
Copy link
Contributor

Tested the 3 scenarios and read patch, it's ok

👍 :)

@astorije
Copy link
Member

Letting @YaManicKill give his second review to this one as he self-assigned #3 at the time.

@AlMcKinlay
Copy link
Member

So, on the basis of @JocelynDelalande having tested this, and it looks good (and solves the issue we had last time we merged it) I'll give my 👍 and merge.

AlMcKinlay added a commit that referenced this pull request Feb 18, 2016
Allow The Lounge to be proxied behind a /path/ url
@AlMcKinlay AlMcKinlay merged commit a95d5e2 into thelounge:master Feb 18, 2016
@gdamjan gdamjan deleted the proxy-path-support branch February 18, 2016 13:16
@astorije
Copy link
Member

Great, really nice addition! I'll publish to npm either today or tomorrow!
(Also, removing second review needed label)

@AlMcKinlay
Copy link
Member

(Also, removing second review needed label)

Sorry, I'll get the hang of this soon. This is the biggest project I've maintained :-P

@astorije astorije added this to the 1.1.0 milestone Apr 1, 2017
@dgw dgw mentioned this pull request Apr 15, 2017
@AlMcKinlay AlMcKinlay removed their assignment Mar 12, 2018
brunnre8 pushed a commit to brunnre8/thelounge that referenced this pull request Apr 6, 2021
Add message for users that join #shout-irc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants