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

Replace double slashes with single ones when mounting keystone on existing express app #2970

Merged
merged 1 commit into from
Jun 1, 2016

Conversation

johnnycrab
Copy link

Description of changes

When using the mount function as described in the wiki, one runs into issues when mounting on root path '/' and trying to open keystone-related URLs as e.g. the admin area. Express doesn't correctly redirect, leading to 404 errors.
This PR fixes this issue by replacing double slashes with single slashes after the current url concatenation via mountPath + req.url.

Related issues (if any)

Testing

  • Please confirm npm run test ran successfully.

@mxstbr
Copy link
Collaborator

mxstbr commented May 29, 2016

This seems very reasonable to me. We'll need to port that change to 0.4 too, would you mind submitting a PR against the master branch too with the same change?

@mxstbr mxstbr added the ready label May 29, 2016
@johnnycrab
Copy link
Author

As far as I can see the mount.js file does no longer exist in 0.4.x, or am I misled somehow?

@JedWatson
Copy link
Member

@mxstbr I think this is handled differently in 0.4... let's set up a test case for it in the test project, and merge this in now.

@JedWatson JedWatson merged commit 1e7560d into keystonejs:v0.3.x Jun 1, 2016
@joernroeder
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants