Skip to content

Commit

Permalink
Merge pull request #37 from alexplusde/skip-other-protocols
Browse files Browse the repository at this point in the history
skip it!
  • Loading branch information
alxndr-w authored Dec 27, 2023
2 parents b9e9a54 + 1121a2e commit 32b5074
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/speed_up.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,12 @@ public function getOutput()
}

foreach ($this->urls as $url) {
$parsedUrl = parse_url($url);
if (isset($parsedUrl['scheme']) && !in_array($parsedUrl['scheme'], ['http', 'https'])) {
continue;
}
$output .= '<link rel="prefetch" href="'. $url .'">'.PHP_EOL;
}

return $output;
}

Expand Down
2 changes: 1 addition & 1 deletion package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: speed_up
version: '1.3.1'
version: '1.4.0'
author: 'Alexander Walther'
supportpage: https://www.alexplus.de

Expand Down

0 comments on commit 32b5074

Please sign in to comment.