Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter austincollinpena

    (@austincollinpena)

    Thanks for such a timely response Oscar! I think I didn’t communicate well enough to you. Forgive the non-PHP code but it should self-explanatory:

    go
    	flyHeader := req.Header.Get("Fly-Client-IP")
    	if flyHeader != "" {
    		flyHeader = "96.127.201.166"
    		req.Header.Set("X-FORWARDED-FOR", flyHeader)
    		req.Header.Set("X-REAL-IP", flyHeader)
    		req.Header.Set("test-header", "itsgooditgetsset")
    	}
    	req.RemoteAddr = flyHeader
    	logger.Logger.Info().Msgf("Set the forward header to %s\n\n", req.Header.Get("x-real-ip"))
    

    What I’m doing is purposefully setting the header to a Canadian IP so I in America can see if it works, but for some reason it’s still not getting parsed. I figured I was setting a header wrong or something else.

    With that in mind, do you have any ideas for what could be going on?

Viewing 1 replies (of 1 total)