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

Fix allowing kue app to be hosted as child of another parent express app #393

Closed
wants to merge 3 commits into from

Conversation

estien
Copy link

@estien estien commented Aug 19, 2014

With this added slash in the base path redirect, the kue app performs correct redirects if it is hosted as part of a parent express app, on its own dedicated path, like so:

var app = require('express')(); // parent express app
app.use('/kueapp', require('kue').app); // we want the kue UI to be available on the 'kueapp' subpath
app.listen(1337); // the kue app is now available on http://localhost:1337/kueapp

This fixes the current failing behavior, as a redirect without the slash sends the user to http://localhost:1337/kueappactive, which returns 404.

@vhain
Copy link
Contributor

vhain commented Aug 25, 2014

i think app.baseUrl is better than app.path()

see #397

@lchenay
Copy link

lchenay commented Sep 5, 2014

+1

@behrad
Copy link
Collaborator

behrad commented Sep 5, 2014

it was formerly
(app.path() === '/') ? res.redirect('/active') : res.redirect('active');
and I think we should use baseUrl instead as @vhain said

@behrad behrad closed this in 9da22a7 Nov 8, 2014
@behrad behrad removed the in progress label Nov 8, 2014
vlad-x pushed a commit to vlad-x/kue that referenced this pull request Nov 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants