Commit Graph

7 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 d5076142cf Typo in README. 2023-05-26 14:42:49 +02:00
Madeorsk a4d73971d3 Move the `parseHttpHeader` function next to the `parse` function. 2023-05-26 14:29:13 +02:00
Madeorsk 1e20a86e4a Add README to present the library and show how to use it. 2023-05-26 14:28:47 +02:00
Madeorsk 83f50ba4e9 Set library version to 1.0.0. 2023-05-26 14:21:00 +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