All you have to do is look at the request object in your controller:
request.host_with_port
or if you don’t want the port, just
request.host
All you have to do is look at the request object in your controller:
request.host_with_port
or if you don’t want the port, just
request.host