diff --git a/app.js b/app.js
index 45e70c8b5..878c85729 100644
--- a/app.js
+++ b/app.js
@@ -191,7 +191,6 @@ app.engine('ejs', ejs.renderFile)
// set view engine
app.set('view engine', 'ejs')
// set generally available variables for all views
-app.locals.useCDN = config.useCDN
app.locals.serverURL = config.serverURL
app.locals.sourceURL = config.sourceURL
app.locals.allowAnonymous = config.allowAnonymous
diff --git a/docs/content/configuration.md b/docs/content/configuration.md
index c6e3fc3eb..a19c749df 100644
--- a/docs/content/configuration.md
+++ b/docs/content/configuration.md
@@ -98,7 +98,6 @@ these are rarely used for various reasons.
| config file | environment | **default** and example value | description |
| --------------- | -------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `allowGravatar` | `CMD_ALLOW_GRAVATAR` | **`true`** or `false` | set to `false` to disable [Libravatar](https://www.libravatar.org/) as profile picture source on your instance. Libravatar is a federated open-source alternative to Gravatar. |
-| `useCDN` | `CMD_USECDN` | **`false`** or `true` | set to use CDN resources or not (default is `false`) |
## Users and Privileges
diff --git a/lib/config/default.js b/lib/config/default.js
index c1f3f9733..f98adf37b 100644
--- a/lib/config/default.js
+++ b/lib/config/default.js
@@ -29,7 +29,6 @@ module.exports = {
},
cookiePolicy: 'lax',
protocolUseSSL: false,
- useCDN: false,
allowAnonymous: true,
allowAnonymousEdits: false,
allowFreeURL: false,
diff --git a/lib/config/environment.js b/lib/config/environment.js
index 1a43a88f9..e9b711ff0 100644
--- a/lib/config/environment.js
+++ b/lib/config/environment.js
@@ -27,7 +27,6 @@ module.exports = {
cookiePolicy: process.env.CMD_COOKIE_POLICY,
protocolUseSSL: toBooleanConfig(process.env.CMD_PROTOCOL_USESSL),
allowOrigin: toArrayConfig(process.env.CMD_ALLOW_ORIGIN),
- useCDN: toBooleanConfig(process.env.CMD_USECDN),
allowAnonymous: toBooleanConfig(process.env.CMD_ALLOW_ANONYMOUS),
allowAnonymousEdits: toBooleanConfig(process.env.CMD_ALLOW_ANONYMOUS_EDITS),
allowFreeURL: toBooleanConfig(process.env.CMD_ALLOW_FREEURL),
diff --git a/lib/config/hackmdEnvironment.js b/lib/config/hackmdEnvironment.js
index 76e413612..c40ffc961 100644
--- a/lib/config/hackmdEnvironment.js
+++ b/lib/config/hackmdEnvironment.js
@@ -20,7 +20,6 @@ module.exports = {
},
protocolUseSSL: toBooleanConfig(process.env.HMD_PROTOCOL_USESSL),
allowOrigin: toArrayConfig(process.env.HMD_ALLOW_ORIGIN),
- useCDN: toBooleanConfig(process.env.HMD_USECDN),
allowAnonymous: toBooleanConfig(process.env.HMD_ALLOW_ANONYMOUS),
allowAnonymousEdits: toBooleanConfig(process.env.HMD_ALLOW_ANONYMOUS_EDITS),
allowFreeURL: toBooleanConfig(process.env.HMD_ALLOW_FREEURL),
diff --git a/lib/config/oldDefault.js b/lib/config/oldDefault.js
index 738ad9f7d..c9af50988 100644
--- a/lib/config/oldDefault.js
+++ b/lib/config/oldDefault.js
@@ -6,7 +6,6 @@ module.exports = {
alloworigin: undefined,
usessl: undefined,
protocolusessl: undefined,
- usecdn: undefined,
allowanonymous: undefined,
allowanonymousedits: undefined,
allowfreeurl: undefined,
diff --git a/lib/csp.js b/lib/csp.js
index 74404413c..76426d526 100644
--- a/lib/csp.js
+++ b/lib/csp.js
@@ -15,12 +15,6 @@ const defaultDirectives = {
connectSrc: ['*']
}
-const cdnDirectives = {
- scriptSrc: ['https://cdnjs.cloudflare.com', 'https://cdn.mathjax.org'],
- styleSrc: ['https://cdnjs.cloudflare.com', 'https://fonts.googleapis.com'],
- fontSrc: ['https://cdnjs.cloudflare.com', 'https://fonts.gstatic.com']
-}
-
const disqusDirectives = {
scriptSrc: ['https://disqus.com', 'https://*.disqus.com', 'https://*.disquscdn.com'],
styleSrc: ['https://*.disquscdn.com'],
@@ -39,7 +33,6 @@ CspStrategy.computeDirectives = function () {
const directives = {}
mergeDirectives(directives, config.csp.directives)
mergeDirectivesIf(config.csp.addDefaults, directives, defaultDirectives)
- mergeDirectivesIf(config.useCDN, directives, cdnDirectives)
mergeDirectivesIf(config.csp.addDisqus, directives, disqusDirectives)
mergeDirectivesIf(config.csp.addGoogleAnalytics, directives, googleAnalyticsDirectives)
mergeDirectivesIf(config.dropbox.appKey, directives, dropboxDirectives)
diff --git a/public/views/hedgedoc/footer.ejs b/public/views/hedgedoc/footer.ejs
index 86572091e..c3927db77 100644
--- a/public/views/hedgedoc/footer.ejs
+++ b/public/views/hedgedoc/footer.ejs
@@ -1,28 +1,5 @@
-<% if(useCDN) { %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<%- include('../build/index-scripts') %>
-<% } else { %>
<%- include('../build/index-pack-scripts') %>
-<% } %>
diff --git a/public/views/hedgedoc/head.ejs b/public/views/hedgedoc/head.ejs
index 419d5dcc7..c2321fccf 100644
--- a/public/views/hedgedoc/head.ejs
+++ b/public/views/hedgedoc/head.ejs
@@ -15,15 +15,5 @@
<% } %>