Follow on to the request to get caller IP.. Also need the server name #1262
-
Similar to http servlet request, it has the calling server name, need that also... So i have external authorization that might generate Http Cookies that i want to embed as a 'Set-Cookie' on the response.. In order to set the proper domain on the cookie, I need to have the incoming server name from the client request.... This would be a follow on to get the request connection information when i asked for the IP address only Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
It's possible to get the HOST header from an
This will report the data that the client has provided (which may be an IP address or a DNS resolvable name or ...). There is no service within the router to perform a DNS lookup, so if the host details weren't in the form you required, you would have to provide that capability to your plugin. I can't recommend a rust DNS lib, but there seem to be a selection to choose from. |
Beta Was this translation helpful? Give feedback.
It's possible to get the HOST header from an
originating_request
member. You can also retrieve the host member from the originating_request URI details. e.g.:This will report the data that the client has provided (which may be an IP address or a DNS resolvable name or ...). There is no service within the router to perform a DNS lookup, so if the host details weren't in the form you required, you would have to provide that capability to your plugin.
I can't recommend a rust DNS lib, but there seem to be a selection to choose from.