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

Give mounted app access to its mount path (#4). #19

Closed
wants to merge 4 commits into from

Conversation

clintwood
Copy link

I need this for mounted site... unless there is another way to resolve URLs?

@tj
Copy link
Member

tj commented May 5, 2014

#1 would be probably the best for logging etc and this case

@clintwood
Copy link
Author

@visionmedia, if by #1 you mean full url, koajs already has this.originalUrl and what is difficult to infer from app.use(mount('/prefix', webapp)); inside webapp is /prefix.

So for logging etc. we just use this.originalUrl but we still need the mount prefix.

I've renamed .mountPath to .mountPrefix to be more clear on intent.

@clintwood clintwood changed the title Give mounted app access to its mount path (#4). Give mounted app access to its mount prefix (#4). May 6, 2014
@tj
Copy link
Member

tj commented May 6, 2014

oops forgot we added it in core. I like .mountPath better actually since we don't just check the prefix anymore, we used to. I think we should just leave the path passed as-is though no stripping of trailing slash

@clintwood
Copy link
Author

Done... Not sure what happened there... squashed previous commit and now I have this...

@clintwood clintwood changed the title Give mounted app access to its mount prefix (#4). Give mounted app access to its mount path (#4). May 8, 2014
@tj
Copy link
Member

tj commented May 8, 2014

weird! added it and released

@tj tj closed this May 8, 2014
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.

3 participants