From f3cfc6abe0a77e084226b05084efc445cf02eb20 Mon Sep 17 00:00:00 2001 From: Wingy Date: Tue, 1 Dec 2020 21:39:11 -0500 Subject: [PATCH] Remove CDN usage Cache Partitioning is now a thing in browsers. This negates the advantage of a CDN. --- config/index.js | 1 - views/layout.pug | 15 +++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/config/index.js b/config/index.js index f7e8eca..fe0c2c3 100644 --- a/config/index.js +++ b/config/index.js @@ -12,7 +12,6 @@ module.exports = { sessionMaxAge: Number(process.env.SESSION_MAX_AGE) || 1000 * 60 * 60 * 24 * 7, siteTitle: process.env.SITE_TITLE || 'Christmas Community', shortTitle: process.env.SHORT_TITLE || 'Christmas', - useCDN: yesNo.parse(process.env.USE_CDN || true), wishlist: require('./wishlist'), base: (process.env.ROOT_PATH || '/').endsWith('/') ? (process.env.ROOT_PATH || '/') : `${process.env.ROOT_PATH}/`, trustProxy: process.env.TRUST_PROXY === 'true' ? true : process.env.TRUST_PROXY || 'loopback', diff --git a/views/layout.pug b/views/layout.pug index 8fe0aca..7140456 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -10,18 +10,9 @@ html(lang='en') title #{config.siteTitle} - #{title} else title #{config.siteTitle} - if config.useCDN - link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.4/css/bulma.min.css') - link( - rel='stylesheet', - href='https://use.fontawesome.com/releases/v5.5.0/css/all.css', - crossorigin='anonymous' - ) - link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css') - else - link(rel='stylesheet', href=`${_CC.config.base}libraries/bulma.min.css`) - link(rel='stylesheet', href=`${_CC.config.base}libraries/fontawesome/css/all.css`) - link(rel='stylesheet', href=`${_CC.config.base}libraries/animate.min.css`) + link(rel='stylesheet', href=`${_CC.config.base}libraries/bulma.min.css`) + link(rel='stylesheet', href=`${_CC.config.base}libraries/fontawesome/css/all.css`) + link(rel='stylesheet', href=`${_CC.config.base}libraries/animate.min.css`) link(rel='stylesheet', href=`${_CC.config.base}css/main.css`) body .print