feat(js): reverse proxy /libs/ to cdn

This commit is contained in:
curben 2019-09-03 17:21:29 +01:00
parent aad3d15fbb
commit 6a79558512
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
3 changed files with 3 additions and 3 deletions

View File

@ -2,4 +2,4 @@
/ /blog/ 302
# Reverse proxy to cdn
/extjs/* https://cdnjs.cloudflare.com/ajax/libs/:splat 200
/libs/* https://cdn.statically.io/libs/:splat 200

View File

@ -1,5 +1,5 @@
<% if (is_post()) { %>
<%- addJs({ src: 'https://cdn.statically.io/libs/clipboard.js/2.0.4/clipboard.min.js', 'data-sri-fallback': '/js/clipboard.min.js', integrity: 'sha384-8CYhPwYlLELodlcQV713V9ZikA3DlCVaXFDpjHfP8Z36gpddf/Vrt47XmKDsCttu', crossorigin: 'anonymous', defer: true}) %>
<%- addJs({ src: '/libs/clipboard.js/2.0.4/clipboard.min.js', 'data-sri-fallback': '/js/clipboard.min.js', integrity: 'sha384-8CYhPwYlLELodlcQV713V9ZikA3DlCVaXFDpjHfP8Z36gpddf/Vrt47XmKDsCttu', crossorigin: 'anonymous', defer: true}) %>
<% } %>
<%/* javascript of Typing theme */%>

View File

@ -50,6 +50,6 @@
<%- addCss('/css/typing.css') %>
<% if (theme.icons) { %>
<%- addCss({ href: 'https://cdn.statically.io/libs/fork-awesome/1.1.7/css/fork-awesome.min.css', 'data-sri-fallback': '/forkawesome/css/fork-awesome.min.css', integrity: 'sha384-mByhW6NjnxyShh67P9+fepUvYSd7Uz/qV6e2u4kA2Fi4ZkjXxIP2mRkyK9dwK24W', crossorigin: 'anonymous' }) %>
<%- addCss({ href: '/libs/fork-awesome/1.1.7/css/fork-awesome.min.css', 'data-sri-fallback': '/forkawesome/css/fork-awesome.min.css', integrity: 'sha384-mByhW6NjnxyShh67P9+fepUvYSd7Uz/qV6e2u4kA2Fi4ZkjXxIP2mRkyK9dwK24W', crossorigin: 'anonymous' }) %>
<% } %>
</head>