Take redirects off the Host header.
Same-site redirects are now relative paths, and a saved page on another site is ignored. The HTTP to HTTPS redirect takes its host from the new SITE_URL setting, and without it the pages refuse plain HTTP.
This commit is contained in:
@@ -15,6 +15,11 @@ abstract class PageTestCase extends \PHPUnit\Framework\TestCase {
|
||||
protected static string $base;
|
||||
private static $server = NULL;
|
||||
|
||||
// Environment variables for the server, on top of the usual ones
|
||||
protected static function serverEnv(): array {
|
||||
return array();
|
||||
}
|
||||
|
||||
// The cookies that the site set, name => value
|
||||
protected array $cookies = array();
|
||||
|
||||
@@ -43,7 +48,7 @@ abstract class PageTestCase extends \PHPUnit\Framework\TestCase {
|
||||
'XXX_TEST_LOG' => self::$state . '/php.log',
|
||||
'MAIL_LOG' => self::$state . '/mail.jsonl',
|
||||
'UPLOAD_DIR' => self::$state . '/tmp/uploads',
|
||||
);
|
||||
) + static::serverEnv();
|
||||
$log = array('file', self::$state . '/server.log', 'a');
|
||||
self::$server = proc_open($command, array(0 => array('file', '/dev/null', 'r'), 1 => $log, 2 => $log), $pipes, XXX_ROOT, $env);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user