Closed sonoranDesert closed 9 years ago
You should be able to get it via:
app.request.headers.get('Host')
You can access the complete url through the shelf.Request
object:
app.request.shelfRequest.requestedUri
Let me know if that helps
If you still have any problem or doubts, please let me know
Is there are way to get the fqdn or hostname requested by the client?
I see that I can look at app.request.url and app.request.url.path, but I need the actual server name / hostname from the request.
For example, if my redstone app serves a request for http://example.com/myresource, I know that app.request object has the "/myresource" string, but there is now way to get "example.com".
I need this so that I can do a 302 redirect if an old hostname is used in the request.
BTW I love redstone. It's by far the best Dart web framework I've used.