File tree Expand file tree Collapse file tree 3 files changed +5
-28
lines changed Expand file tree Collapse file tree 3 files changed +5
-28
lines changed Original file line number Diff line number Diff line change @@ -16,30 +16,7 @@ const parseUriField = uri => {
1616 return JSON . parse ( fromBase64 ( uri . slice ( 1 ) ) ) ;
1717} ;
1818
19- const isHtml = urlStr => {
20- const parsedUrl = url . parse ( urlStr ) ;
21- const path = parsedUrl . pathname ;
22- const basename = path . split ( "/" ) . pop ( ) ;
23-
24- if ( basename === "" ) return true ;
25-
26- // doesn't detect index.whatever.html (multiple dots)
27- const hasHtmlOrNoExtension = ! ! basename . match ( / ^ ( ( [ ^ . ] | \. h t m l ? ) + ) $ / ) ;
28-
29- if ( hasHtmlOrNoExtension ) return true ;
30-
31- // hack to handle basenames with multiple dots: index.whatever.html
32- const endsInHtml = ! ! basename . match ( / .h t m l ? $ / ) ;
33-
34- if ( endsInHtml ) return true ;
35-
36- // hack to detect extensions that are not HTML so we can handle
37- // paths with dots in them
38- const endsInOtherExtension = basename . match ( / \. [ a - z A - Z ] { 1 , 5 } $ / ) ;
39- if ( ! endsInOtherExtension ) return true ;
40-
41- return false ;
42- } ;
19+ const isHtml = require ( "prerendercloud" ) . util . urlPathIsHtml ;
4320
4421module . exports = {
4522 USER_AGENT_PLACEHOLDER ,
Original file line number Diff line number Diff line change 66 "serverless" : " 1.24.1"
77 },
88 "dependencies" : {
9- "prerendercloud" : " ^1.23.2 "
9+ "prerendercloud" : " 1.27.0 "
1010 }
1111}
Original file line number Diff line number Diff line change @@ -1300,9 +1300,9 @@ prepend-http@^2.0.0:
13001300 version "2.0.0"
13011301 resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
13021302
1303- prerendercloud@^1.23.2 :
1304- version "1.23.2 "
1305- resolved "https://registry.yarnpkg.com/prerendercloud/-/prerendercloud-1.23.2 .tgz#297981b968b0944143b6915a91fce258964a3933 "
1303+ prerendercloud@1.27.0 :
1304+ version "1.27.0 "
1305+ resolved "https://registry.yarnpkg.com/prerendercloud/-/prerendercloud-1.27.0 .tgz#992c64a1420aeb20c02b2c19dd740d64a5ad8cff "
13061306 dependencies :
13071307 debug "^2.2.0"
13081308 got-lite "^8.0.1"
You can’t perform that action at this time.
0 commit comments