Server Name or Hostname access #995
mustafa519
started this conversation in
General
Replies: 1 comment 1 reply
-
The server name matches whatever your pattern in the router is. So if you want to catch a specific servername, add a handler for that servername. There is no getter (I think?) in the library yet, but that could also be added like getServerName() |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
First, thank you for providing this package to the community, including me. It feels like a game changer for node.js ecosystem. And I'll do my best to bring something cool by using uws.js.
Recently, I started implementing a framework like MVC pattern on top of uws.js. Minimal API was really fun to develop like tiny details let me do anything I want so far.
However, at the current progress, I am kind of stuck. I am trying to proxying the incoming request but, I have only the host header which let me create the full URL of the incoming request. As far I know, host header cannot be trusted in any case.
The question is, how can I have the exact requested full URL which is reliable?
addServerName
callback is cool and lets me know if the request is not from the host that I haven't set. Still, there is no way to know what is the server name of the incoming request.Or am I missing something after read ten pages of discussions and all the examples too?
P.S: This is my first experience getting deeper on the HTTP. I appreciate it if you guys would lead me.
Thanks,
Mustafa.
Beta Was this translation helpful? Give feedback.
All reactions