mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
@@ -101,12 +101,6 @@ class HttpClient
|
||||
$response->buffer .= $chunk;
|
||||
|
||||
$this->sendChunkToServer($chunk, $proxyConnection);
|
||||
|
||||
if ($chunk === "") {
|
||||
$this->logResponse($response->buffer);
|
||||
|
||||
optional($proxyConnection)->close();
|
||||
}
|
||||
});
|
||||
|
||||
$body->on('close', function () use ($proxyConnection, $response) {
|
||||
|
||||
@@ -32,6 +32,7 @@ class CliRequestLogger extends Logger
|
||||
|
||||
public function logRequest(LoggedRequest $loggedRequest)
|
||||
{
|
||||
return;
|
||||
if ($this->requests->has($loggedRequest->id())) {
|
||||
$this->requests[$loggedRequest->id()] = $loggedRequest;
|
||||
} else {
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Server\Http\Controllers\Admin;
|
||||
|
||||
use App\Contracts\ConnectionManager;
|
||||
use App\HttpServer\Controllers\PostController;
|
||||
use App\Server\Configuration;
|
||||
use Clue\React\SQLite\DatabaseInterface;
|
||||
use Clue\React\SQLite\Result;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
@@ -18,16 +19,23 @@ class ListSitesController extends PostController
|
||||
{
|
||||
/** @var ConnectionManager */
|
||||
protected $connectionManager;
|
||||
/** @var Configuration */
|
||||
protected $configuration;
|
||||
|
||||
public function __construct(ConnectionManager $connectionManager)
|
||||
public function __construct(ConnectionManager $connectionManager, Configuration $configuration)
|
||||
{
|
||||
$this->connectionManager = $connectionManager;
|
||||
$this->configuration = $configuration;
|
||||
}
|
||||
|
||||
public function handle(Request $request, ConnectionInterface $httpConnection)
|
||||
{
|
||||
try {
|
||||
$sites = $this->getView('server.sites.index', ['sites' => $this->connectionManager->getConnections()]);
|
||||
$sites = $this->getView('server.sites.index', [
|
||||
'scheme' => $this->configuration->port() === 443 ? 'https' : 'http',
|
||||
'configuration' => $this->configuration,
|
||||
'sites' => $this->connectionManager->getConnections()
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
dump($e->getMessage());
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
{{ site.host }}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200 text-sm leading-5 text-gray-500">
|
||||
{{ site.subdomain }}.localhost:8080
|
||||
{{ site.subdomain }}.{{ configuration.hostname()}}:{{ configuration.port() }}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-no-wrap border-b border-gray-200 text-sm leading-5 text-gray-500">
|
||||
{{ site.shared_at }}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-no-wrap text-right border-b border-gray-200 text-sm leading-5 font-medium">
|
||||
<a href="http://{{ site.subdomain }}.localhost:8080" target="_blank"
|
||||
<a href="{{ scheme }}://{{ site.subdomain }}.{{ configuration.hostname()}}:{{ configuration.port() }}" target="_blank"
|
||||
class="text-indigo-600 hover:text-indigo-900">Visit</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user