Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

X-Forwarded-Host Configuration help

Gajji
Cirrostratus
Cirrostratus

The X-Forwarded-Host HTTP request header is required to forward the original Host HTTP request header value to the origin server.

 

When the user sends requests to https://abc.pfc.net/ , the request forwarded by F5 to the backend server

 must contain the X-Forwarded-Host header with the value of the source of the request (which is https://abc.pfc.net/ in this example)

 

The backend server should be able to know what the host/FQDN from which the request came from so it will return to the client the same URL.

1 REPLY 1

SanjayP
MVP
MVP

BIGIP doesn't modify HOST header values by default. So server should receive original HOST header coming from the client. But if you still want to pass it explicitly you can use something sort of below.

when HTTP_REQUEST {
  while {[HTTP::header exists "X-Forwarded-Host"]}{
    HTTP::header remove "X-Forwarded-Host"
  }
  HTTP::header insert "X-Forwarded-Host" [HTTP::host]
}