We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b35768a commit 2b59448Copy full SHA for 2b59448
proxy.php
@@ -256,6 +256,16 @@
256
// Pass through the Content-Type header
257
array_push($headers, "Content-Type: ".$_SERVER['CONTENT_TYPE'] );
258
}
259
+ if ( isset($_SERVER['HTTP_X_USER_AGENT']) ) {
260
+ // Pass through the X-User-Agent header
261
+ array_push($headers, "X-User-Agent: ".$_SERVER['HTTP_X_USER_AGENT'] );
262
+ }
263
+ if ( isset($_SERVER['HTTP_X_FORWARDED_FOR']) ) {
264
+ array_push($headers, $_SERVER['HTTP_X_FORWARDED_FOR'].", ".$_SERVER['HTTP_X_USER_AGENT'] );
265
+ } else {
266
+ array_push($headers, "X-Forwarded-For: ".$_SERVER['REMOTE_ADDR'] );
267
268
+
269
if ( count($headers) > 0 ) {
270
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
271
0 commit comments