Forum Discussion

Brantly_Perry_1's avatar
Brantly_Perry_1
Icon for Nimbostratus rankNimbostratus
Apr 29, 2009

Inject referer into request header

Hello all. Is there a way with irules to write a referer into a request header? When we connect to the virtual server address, and follow a particular link, there is no referer in the request header. This is causing us a 302 error. If we connect directly to the application server, bypassing the virtual address, the referer is in the header. Is there any way for me to resolve this issue? Thanks so much!

4 Replies

  • Hi,

     

     

    You can insert an HTTP header in the request that is sent to the pool member using HTTP::header insert (Click here), but I'm curious to know why the browser isn't inserting a Referer header to begin with. Can you trace the requests using a browser plugin like HttpFox for Firefox or Fiddler for IE and post anonymized examples of the issue?

     

     

    Thanks,

     

    Aaron
  • Example when connecting to virtual address:

     

     

    Connection

     

    close

     

    Set-Cookie

     

    ISAWPLB{8CAA4B3C-56BA-457B-8E8F-E07EF2E350E4}={E703179A-7E37-4800-BD26-4F6E5DE790D2}; HttpOnly; Path

     

    =/

     

    ASP.NET_SessionId=imt4kebg2xjsthmis0fkh3az; path=/; HttpOnly

     

    Date

     

    Thu, 30 Apr 2009 12:48:42 GMT

     

    Location

     

    http://www.healthwise.org

     

    Content-Type

     

    text/html

     

    Server

     

    Microsoft-IIS/7.0

     

    Cache-Control

     

    private

     

    X-AspNet-Version

     

    2.0.50727

     

    X-Powered-By

     

    ASP.NET

     

    p3p

     

    CP="NOI DSP CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT STA"

     

    Transfer-Encoding

     

    chunked

     

    Request Headers

     

    Host

     

    www.healthwise.net

     

    User-Agent

     

    Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR

     

    3.5.30729)

     

    Accept

     

    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

     

    Accept-Language

     

    en-us,en;q=0.5

     

    Accept-Encoding

     

    gzip,deflate

     

    Accept-Charset

     

    ISO-8859-1,utf-8;q=0.7,*;q=0.7

     

    Keep-Alive

     

    300

     

    Connection

     

    keep-alive

     

  • Connecting to physical address:

     

    Connection

     

    Keep-Alive

     

    Content-Length

     

    83876

     

    Date

     

    Thu, 30 Apr 2009 12:50:51 GMT

     

    Content-Type

     

    application/x-shockwave-flash

     

    Server

     

    Microsoft-IIS/7.0

     

    Cache-Control

     

    private

     

    X-AspNet-Version

     

    2.0.50727

     

    X-Powered-By

     

    ASP.NET

     

    p3p

     

    CP="NOI DSP CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT STA"

     

    Request Headers

     

    Host

     

    www.healthwise.net

     

    User-Agent

     

    Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR

     

    3.5.30729)

     

    Accept

     

    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

     

    Accept-Language

     

    en-us,en;q=0.5

     

    Accept-Encoding

     

    gzip,deflate

     

    Accept-Charset

     

    ISO-8859-1,utf-8;q=0.7,*;q=0.7

     

    Keep-Alive

     

    300

     

    Connection

     

    keep-alive

     

    Referer

     

    http://stdc1bea01:7001/member/eBusiness.portal?_nfpb=true&_pageLabel=book_resources

     

    Cookie

     

    ISAWPLB{8CAA4B3C-56BA-457B-8E8F-E07EF2E350E4}={E703179A-7E37-4800-BD26-4F6E5DE790D2}; ASP.NET_SessionId

     

    =imt4kebg2xjsthmis0fkh3az

     

     

  • I assume you're making two requests to the VIP and two requests direct to the server. Can you try to do this and show the requested URIs? Also, when you copy can you preserve the lines?

     

     

    Thanks,

     

    Aaron