Skip to content

Commit fc50a5d

Browse files
committed
Added get url method
1 parent 7fe2178 commit fc50a5d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/OpCacheGUI/Network/Request.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,14 @@ public function post($name)
105105
return $this->postVariables[$name];
106106
}
107107

108-
public function getPath()
108+
public function getUrl()
109109
{
110-
return $this->serverVariables['REQUEST_URI'];
110+
$scheme = 'http';
111+
112+
if (isset($this->serverVariables['HTTPS']) && $this->serverVariables['HTTPS'] === 'on') {
113+
$scheme .= 's';
114+
}
115+
116+
return $scheme . '://' . $this->serverVariables['HTTP_HOST'] . $this->serverVariables['REQUEST_URI'];
111117
}
112118
}

0 commit comments

Comments
 (0)