Skip to content

Commit

Permalink
Send IP from Apache module and allow client IP header
Browse files Browse the repository at this point in the history
  • Loading branch information
botimer committed Dec 13, 2023
1 parent 9ba88a2 commit e501223
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions apache/client/src/lauth/api_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace mlibrary::lauth {
AuthorizationResult ApiClient::authorize(Request req) {
HttpParams params {
{"ip", req.ip},
{"uri", req.uri},
{"user", req.user}
};
Expand Down
1 change: 1 addition & 0 deletions apache/client/test/lauth/api_client_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ TEST(ApiClient, HttpRequestByApiClientIsCorrect) {
};

HttpParams params {
{"ip", req.ip},
{"uri", req.uri},
{"user", req.user}
};
Expand Down
2 changes: 2 additions & 0 deletions apache/conf/lauth.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ LoadModule lauth_module modules/mod_lauth.so
<Location /lauth>
SetHandler lauth
</Location>

RemoteIPHeader X-Client-IP

0 comments on commit e501223

Please sign in to comment.