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:
@@ -23,11 +23,11 @@ class EditTest extends PageTestCase {
|
||||
|
||||
public function testVisitorsAreSentToTheLogin(): void {
|
||||
$this->cookies = array();
|
||||
$this->assertRedirect('https://xxx.org.za/publish/login', $this->get('/publish/edit'));
|
||||
$this->assertRedirect('/publish/login', $this->get('/publish/edit'));
|
||||
}
|
||||
|
||||
public function testPlainHttpIsSentToHttps(): void {
|
||||
$this->assertRedirect('https://xxx.org.za/publish/edit?id=1', $this->get('/publish/edit?id=1', array('X-Test-Plain' => '1')));
|
||||
$this->assertRedirect('https://site.test/publish/edit?id=1', $this->get('/publish/edit?id=1', array('X-Test-Plain' => '1')));
|
||||
}
|
||||
|
||||
public function testTheQueueIsShownFirst(): void {
|
||||
|
||||
Reference in New Issue
Block a user