Commit Graph

4 Commits

Author SHA1 Message Date
Madeorsk fe4838f284 Fix exception when "HTTP_FORWARDED" header is not present. 2024-01-17 12:39:25 +01:00
Madeorsk a4d73971d3 Move the `parseHttpHeader` function next to the `parse` function. 2023-05-26 14:29:13 +02:00
Madeorsk 2c663fffd4 Add helper functions in Forwarded class.
+ `Forwarded::get()` to get the parsed `Forwarded` header.
+ `Forwarded::getOriginIp()` to get the IP address of the origin of the request directly.
2023-05-26 14:18:58 +02:00
Madeorsk 6810b25f58 First version of the library, with unit tests.
+ Add a parser of Forwarded header.
+ Add classes for the Forwarded header in itself, and its components like a single Forward and its ForwardNodes.
+ Unit tests of some of the usable methods.
2023-05-26 02:25:15 +02:00