Skip to content

Commit 1ff4d3a

Browse files
Merge pull request #1703 from gazben/patch-8
Fix http/https only detection
2 parents e3c8b31 + 6227941 commit 1ff4d3a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Routing/Route.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,8 @@ public function methods()
511511
*/
512512
public function httpOnly()
513513
{
514-
return in_array('https', $this->action, true)
515-
|| (array_key_exists('https', $this->action) && $this->action['https']);
514+
return in_array('http', $this->action, true)
515+
|| (array_key_exists('http', $this->action) && $this->action['http']);
516516
}
517517

518518
/**
@@ -532,7 +532,8 @@ public function httpsOnly()
532532
*/
533533
public function secure()
534534
{
535-
return in_array('https', $this->action, true);
535+
return in_array('https', $this->action, true)
536+
|| (array_key_exists('https', $this->action) && $this->action['https']);
536537
}
537538

538539
/**

0 commit comments

Comments
 (0)