append standard ports to HOST: www.xxx.com:443 or 80

Is there a way to append the standard ports (80/443) to the http request host field. at present all I can see is the originating url HOST: my preference is to see HOST: or 80

can this be done with a simple irule? if so are there any examples.

F5 LTM by the way

Thanks

Hi, Sorry to answer your question with a question. You can probably do it with iRules, but why do you want to do it? What problem are you trying to solve?

Hi mate,

It can be easily done with an iRule. Can you let us know the requirement please.

If the port in the URI/URL is different than the standard port (80,443), it must be added to the Host header as well. If it is the standard port, you ‘can’ add it, however it is not required.

-Jinshu

We have migrated from an ISA to an F5 solution, previously through the ISA this format was available.. The application team use this value to provide checks/reporting/etc .

Hi Jkb87,

you may try the iRule below to a.) strip any existing

:PortNumber

informations from the incomming HOST-Header (if exist) and to b.) add the used Virtual Server TCP-Port to the forwarded HOST-header value.

when HTTP_REQUEST {
    HTTP::host "[getfield [HTTP::host] ":" 1]:[TCP::local_port]"
}

Cheers, Kai