@@ -33,7 +33,6 @@ public function handle(Request $request, Closure $next)
3333 return $ response ;
3434 }
3535
36- // use the crawler to fetch the nodes we want from the response
3736 $ this ->fetchLinkableNodes ($ response );
3837
3938 return $ response ;
@@ -48,20 +47,11 @@ protected function fetchLinkableNodes(Response $response)
4847 {
4948 $ crawler = $ this ->getCrawler ($ response );
5049
51- // look to see if link can have any type other than css or a font
52- // distinguish font vs css by looking at extension, css vs eot or svg etc...
53-
54- // include images??
55-
5650 $ nodes = $ crawler ->filter ('link, script[src] ' )->extract (['src ' , 'href ' ]);
5751
58- // this is giving me a listing of LOCAL urls for any links or scripts
59- // now I just need to determine which type, make sure you account for query strings on end
6052 $ headers = collect ($ nodes )->flatten (1 )
6153 ->filter ()
62- ->reject (function ($ url ) {
63- return $ this ->isExternalUrl ($ url );
64- })->map (function ($ url ) {
54+ ->map (function ($ url ) {
6555 return $ this ->buildLinkHeaderString ($ url );
6656 })->filter ()
6757 ->implode (', ' );
@@ -89,16 +79,6 @@ protected function getCrawler(Response $response)
8979 return $ this ->crawler = new Crawler ($ response ->getContent ());
9080 }
9181
92- /**
93- * @param $url
94- * @return bool
95- */
96- private function isExternalUrl ($ url )
97- {
98- // is this a local fully qualified url
99- return str_contains ($ url , "// " );
100- }
101-
10282 /**
10383 * @param String $url
10484 * @return string
0 commit comments