Skip to content

Commit 14b47ff

Browse files
committed
Remove extra code, adjust code formatting
1 parent 6204204 commit 14b47ff

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

proxy.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,19 @@
6363
} else {
6464
$request_params = null;
6565
}
66+
6667
// Get URL from `csurl` in GET or POST data, before falling back to X-Proxy-URL header.
6768
if ( isset( $_REQUEST['csurl'] ) ) {
6869
$request_url = urldecode( $_REQUEST['csurl'] );
69-
} else if ( isset( $_REQUEST['csurl'] ) ) {
70-
$request_url = urldecode( $_REQUEST['csurl'] );
71-
}
72-
else if ( isset( $_SERVER['HTTP_X_PROXY_URL'] ) )
73-
{
70+
} else if ( isset( $_SERVER['HTTP_X_PROXY_URL'] ) ) {
7471
$request_url = urldecode( $_SERVER['HTTP_X_PROXY_URL'] );
75-
}
76-
else
77-
{
78-
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
79-
header("Status: 404 Not Found");
72+
} else {
73+
header( $_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
74+
header( 'Status: 404 Not Found' );
8075
$_SERVER['REDIRECT_STATUS'] = 404;
8176
exit;
8277
}
78+
8379
$p_request_url = parse_url( $request_url );
8480

8581
// csurl may exist in GET request methods

0 commit comments

Comments
 (0)