Skip to content

Commit

Permalink
use x-forwarded-for for x-forwarded-for and remove all logs
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Feb 7, 2024
1 parent cedf68b commit a4942b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Cloudcli/ProxyServerHttp.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ static function getHttpClient(Request $request) {
"message" => "Missing env var: CLOUDCLI_API_SERVER"
];
}
\Log::info("Request IP: ". $request->ip());
\Log::info("Request Headers: " . json_encode($request->headers->all()));
// \Log::info("Request IP: ". $request->header("X-Forwarded-For"));
// \Log::info("Request Headers: " . json_encode($request->headers->all()));
return [
"error" => false,
"server" => $server,
Expand All @@ -39,7 +39,7 @@ static function getHttpClient(Request $request) {
"headers" => [
"AuthClientId" => $request->header("AuthClientId", env("CLOUDCLI_API_CLIENTID")),
"AuthSecret" => $request->header("AuthSecret", env("CLOUDCLI_API_SECRET")),
"X-Forwarded-For" => $request->ip(),
"X-Forwarded-For" => $request->header("X-Forwarded-For"),
]
])
];
Expand Down

0 comments on commit a4942b7

Please sign in to comment.