Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
doudz committed Dec 18, 2019
1 parent bc4a232 commit 3ce86cf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions core/php/zigateproxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
$headers_str = [];
$url = 'http://localhost'.$_GET['url'];
$params = '';
foreach ($_GET as $key => $value){
foreach ($_GET as $key => $value) {
if ($key == 'url') {
continue;
}
$params .= $key.'='.$value.'&';
}
$params = trim($params, '&');
if ($params){
if ($params) {
$url = $url.'?'.$params;
}

Expand Down Expand Up @@ -80,14 +80,12 @@

if (isset($info[CURLINFO_CONTENT_TYPE])) {
header('Content-Type: '.$info[CURLINFO_CONTENT_TYPE]);
}
else {
} else {
header('Content-Type: text/html');
}
if (isset($info[CURLINFO_RESPONSE_CODE])) {
http_response_code($info[CURLINFO_RESPONSE_CODE]);
}
else {
} else {
http_response_code(200);
}
header('Access-Control-Allow-Origin: *');
Expand Down

0 comments on commit 3ce86cf

Please sign in to comment.