Open adrien-n opened 6 years ago
You can do this:
Http_headers.find (Http_headers.name "X-Forwarded-For")
hds.Ocsigen_http_frame.Http_header.headers
From Eliom, you can get the header with:
let hds = Eliom_request_info.get_http_header () in
Hi,
I have been trying to retrieve the X-Forwarded-For header and have failed to find a dedicated API so far (like there is for Host). I haven't seen a way to access a header by name (I was looking for a function of type string -> string (option)). It seems to me that the information is not accessible and actually not even stored. Could such accessors be added? I'm sorry if this already exists and I have merely not spotted it.