Skip to content

Commit 53d49f3

Browse files
f-livaJacobBennett
authored andcommitted
Improved URL detection for protocol-relative URLs (#39)
Fixed #38
1 parent 20d728d commit 53d49f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Middleware/AddHttp2ServerPush.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private function buildLinkHeaderString($url)
141141
});
142142

143143

144-
if(!preg_match('%^https?://%i', $url)) {
144+
if(!preg_match('%^(https?:)?//%i', $url)) {
145145
$basePath = $this->getConfig('base_path', '/');
146146
$url = $basePath . ltrim($url, $basePath);
147147
}

0 commit comments

Comments
 (0)