Created
November 25, 2013 14:39
-
-
Save alanning/7642166 to your computer and use it in GitHub Desktop.
Patch to apply James Gill's suggestion to allow environment variable for easier CDN integration. Tested with Meteor 0.6.6.3.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- bundle/programs/server/packages/meteor.js 2013-11-25 08:41:18.000000000 -0500 | |
+++ meteor-patched.js 2013-11-25 08:55:41.000000000 -0500 | |
@@ -922,7 +922,8 @@ | |
if (process.env.ROOT_URL && // 1 | |
typeof __meteor_runtime_config__ === "object") { // 2 | |
__meteor_runtime_config__.ROOT_URL = process.env.ROOT_URL; // 3 | |
- var pathPrefix = Npm.require('url').parse(__meteor_runtime_config__.ROOT_URL).pathname; // 4 | |
+ var pathPrefix = process.env.ROOT_URL_PATH_PREFIX || | |
+ Npm.require('url').parse(__meteor_runtime_config__.ROOT_URL).pathname; // 4 | |
__meteor_runtime_config__.ROOT_URL_PATH_PREFIX = pathPrefix === "/" ? "" : pathPrefix; // 5 | |
} // 6 | |
// 7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment