Skip to content

SwooleConverterOptions

The handful of things a Swoole request cannot tell us and the server operator has to.

final readonly class SwooleConverterOptions

SourceSwooleConverterOptions.php
PropertyTypeDescription
$httpsboolreadonly.
$scriptNamestringreadonly.

public function __construct(string $scriptName = '/index.php', bool $https = false): mixed

Whether Swoole itself is terminating TLS. Not inferred: behind a TLS-terminating proxy this is false and the X-Forwarded-* correction in WorkerRequestFactory is what makes the request https.

ParameterTypeDescription
$scriptNamestringSwoole has no front-controller script, but Routing reads $_SERVER[‘SCRIPT_NAME’] when generating URLs, so a plausible value has to be synthesised.
$httpsboolWhether Swoole itself is terminating TLS. Not inferred: behind a TLS-terminating proxy this is false and the X-Forwarded-* correction in WorkerRequestFactory is what makes the request https.

Returns mixed