Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Question about defaultProxyReqPathResolver #15

Open
fkrauthan opened this issue Aug 7, 2018 · 1 comment
Open

Question about defaultProxyReqPathResolver #15

fkrauthan opened this issue Aug 7, 2018 · 1 comment

Comments

@fkrauthan
Copy link

I looked into the defaultProxyReqPathResolver and I am wondering why you use url.parse to parse the current requested url to extract the path. The koa documentation shows there is a ctx.request. path which already contains the path. Therefor we could save the expensive task of parsing a url. Or am I missing something that requires the url parsing here?

@fkrauthan
Copy link
Author

Actual it could be ctx.request. path + ctx.request.search as this holds the path and the query string (including '?' if needed)

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

No branches or pull requests

1 participant