Skip to content

Commit

Permalink
feat: 修改 link 校验规则
Browse files Browse the repository at this point in the history
  • Loading branch information
wupengFEX committed Jan 8, 2018
1 parent 4a3f5e3 commit 6db132b
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,25 @@
},
"link": {
"mandatory": [{
"rel": "/^(miphtml)|(canonical)|(standardhtml)$/"
"rel": "/^(canonical)|(standardhtml)$/"
}, {
"rel": "/^stylesheet$/",
"href": "/^(https:)?\/\/(mipcache.bdstatic.com\/static\/mipmain)|(m.baidu.com\/static\/ala\/sf\/static\/)|((https:)?\/\/mipcache.bdstatic.com\/static\/v\\d\/)|((https:)?\/\/c.mipcdn.com\/static\/v\\d\/)|((https:)?\/\/c.mipcdn.com\/static\/mipmain)/"
"href": "/^(https:)?\/\/((mipcache\\.bdstatic\\.com\/static\/mipmain-v\\d\\.\\d\\.\\d\\.css)|(c\\.mipcdn\\.com\/static\/mipmain-v\\d\\.\\d\\.\\d\\.css)|(mipcache\\.bdstatic\\.com\/static\/v\\d\/mip\\.css)|(c\\.mipcdn\\.com\/static\/v\\d\/mip\\.css))$/"
}],

"mandatory_parent": "head",
"duplicate": [{
"rel": "/^(miphtml)|(standardhtml)$/"
}, {
"rel": "/^(miphtml)|(canonical)$/"
}, {
"rel": "/^stylesheet$/",
"href": "/^(https:)?\/\/(mipcache.bdstatic.com\/static\/mipmain)|(m.baidu.com\/static\/ala\/sf\/static\/)|(c.mipcdn.com\/static\/mipmain)/"
"rel": "/^(canonical)|(standardhtml)$/"
}],
"attrs": {
"href": [{
"value": "/^(http(s)?:)?\/\//",
"match": {
"rel": "/^(miphtml)|(canonical)|(standardhtml)$/"
"rel": "/^(canonical)|(standardhtml)$/"
}
}, {
"value": "/^(?!\/[^\/])/",
"match": {
"rel": "/^(?!(miphtml)|(canonical)|(standardhtml))$/"
"rel": "/^(?!(canonical)|(standardhtml))$/"
}
}]

Expand Down

0 comments on commit 6db132b

Please sign in to comment.