Add to docs information on routing URLs #2009
dougwilson
started this conversation in
Content
Replies: 1 comment
-
I agree that we need to clarify this in the docs. I can see how it would (did?) lead to some confusion. So your two suggestions @dougwilson seem like a really good place to start. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So there was the issue expressjs/express#3088 filed in Express recently regarding confusion about how Express handles routing when the incoming URL is a full URL instead of just the path (i.e.
GET http://localhost/ HTTP/1.1
vsGET / HTTP/1.1
). I browsed around through the docs and it doesn't seem super clear.I can see two possible ways to enhance the documentation around this:
path
argument matches only against thepathname
part of the request URL and nothing else. This is an indirect answer to a lot of the matching questions like the above as well as calling out that no, it does not match against the query part, host part, etc.http://localhost/foo?bar=1
only routing against the/foo
part.Anyway, those are some of my initial thoughts on the docs from that issue :)
Beta Was this translation helpful? Give feedback.
All reactions