feat(assets): Statically cdn

This commit is contained in:
curben 2019-08-26 12:32:53 +09:30
parent ca57134986
commit 7dc55833fb
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
3 changed files with 6 additions and 4 deletions

View File

@ -3,7 +3,7 @@
X-XSS-Protection: 1; mode=block X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff X-Content-Type-Options: nosniff
Content-Language: en Content-Language: en
Content-Security-Policy: default-src 'self'; child-src 'none'; connect-src 'none'; font-src 'none'; frame-src 'none'; img-src https://cdn.statically.io 'self'; manifest-src 'none'; media-src 'none'; object-src 'none'; prefetch-src 'none'; script-src https://cdnjs.cloudflare.com 'self'; style-src https://cdnjs.cloudflare.com 'self'; worker-src 'none'; base-uri 'none'; form-action https://duckduckgo.com; frame-ancestors 'none'; block-all-mixed-content Content-Security-Policy: default-src 'self'; child-src 'none'; connect-src 'none'; font-src 'none'; frame-src 'none'; img-src https://cdn.statically.io 'self'; manifest-src 'none'; media-src 'none'; object-src 'none'; prefetch-src 'none'; script-src https://cdn.statically.io 'self'; style-src https://cdn.statically.io 'self'; worker-src 'none'; base-uri 'none'; form-action https://duckduckgo.com; frame-ancestors 'none'; block-all-mixed-content
Referrer-Policy: no-referrer Referrer-Policy: no-referrer
Strict-Transport-Security: max-age=31536000 Strict-Transport-Security: max-age=31536000
Feature-Policy: accelerometer 'none'; autoplay 'none'; camera 'none'; document.domain 'none'; display-capture 'none'; encrypted-media 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; sync-xhr 'none'; usb 'none' Feature-Policy: accelerometer 'none'; autoplay 'none'; camera 'none'; document.domain 'none'; display-capture 'none'; encrypted-media 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none'; sync-xhr 'none'; usb 'none'

View File

@ -1,5 +1,5 @@
<% if (is_post()) { %> <% if (is_post()) { %>
<%- addJs({ src: 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js', 'data-sri-fallback': '/js/clipboard.min.js', integrity: 'sha384-8CYhPwYlLELodlcQV713V9ZikA3DlCVaXFDpjHfP8Z36gpddf/Vrt47XmKDsCttu', crossorigin: 'anonymous'}) %> <%- 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'}) %>
<% } %> <% } %>
<%/* javascript of Typing theme */%> <%/* javascript of Typing theme */%>

View File

@ -46,11 +46,13 @@
<%- addJs('/js/sri.min.js') %> <%- addJs('/js/sri.min.js') %>
<%/* Polyfill for <img loading="lazy"> */%> <%/* Polyfill for <img loading="lazy"> */%>
<%- addJs('/js/loading-attribute-polyfill.min.js') %> <% if (is_post()) { %>
<%- addJs({ src: 'https://cdn.statically.io/gh/mfranzke/loading-attribute-polyfill/65fca968/loading-attribute-polyfill.min.js', 'data-sri-fallback': '/js/loading-attribute-polyfill.min.js', integrity: 'sha384-8jTDDmc3bqX0o3YImTHy8PKVewXMkZLzo1aXpDhU3ezHoimhZxF5psMm7PjKnSt9', crossorigin: 'anonymous'}) %>
<% } %>
<%- addCss('/css/typing.css') %> <%- addCss('/css/typing.css') %>
<% if (theme.icons) { %> <% if (theme.icons) { %>
<%- addCss({ href: 'https://cdnjs.cloudflare.com/ajax/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: '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' }) %>
<% } %> <% } %>
</head> </head>