Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added CDN settings to reaction #4316

Merged
merged 9 commits into from Jul 11, 2018
14 changes: 14 additions & 0 deletions imports/plugins/core/core/server/startup/cdn.js
@@ -0,0 +1,14 @@
import { Meteor } from "meteor/meteor";

/**
* @name setupCdn
* @summary sets prefix for the user who wants to serve bundled js and css
* files from different URL
*
* @return {undefined} undefined
*/
export default function setupCdn() {
if (Meteor.settings.cdnPrefix) {
Meteor.startup(() => WebAppInternals.setBundledJsCssPrefix(Meteor.settings.cdnPrefix)); // eslint-disable-line no-undef
}
}
2 changes: 2 additions & 0 deletions imports/plugins/core/core/server/startup/index.js
Expand Up @@ -10,6 +10,7 @@ import Prerender from "./prerender";
import RateLimiters from "./rate-limits";
import RegisterCore from "./register-core";
import RegisterRouter from "./register-router";
import setupCdn from "./cdn";
import Reaction from "../Reaction";
import { Shops } from "/lib/collections";

Expand All @@ -26,6 +27,7 @@ SimpleSchema.defineValidationErrorTransform((error) => {
export default function startup() {
const startTime = Date.now();

setupCdn();
Accounts();
RegisterCore();
RegisterRouter();
Expand Down