|
|
|
@ -10,6 +10,7 @@ const Core = require("./commands/core");
|
|
|
|
|
|
|
|
|
|
const Quota = require("./commands/quota");
|
|
|
|
|
const Util = require("./common-util");
|
|
|
|
|
const Package = require("../package.json");
|
|
|
|
|
|
|
|
|
|
var canonicalizeOrigin = function (s) {
|
|
|
|
|
if (typeof(s) === 'undefined') { return; }
|
|
|
|
@ -18,6 +19,8 @@ var canonicalizeOrigin = function (s) {
|
|
|
|
|
|
|
|
|
|
module.exports.create = function (config) {
|
|
|
|
|
const Env = {
|
|
|
|
|
version: Package.version,
|
|
|
|
|
|
|
|
|
|
httpUnsafeOrigin: canonicalizeOrigin(config.httpUnsafeOrigin),
|
|
|
|
|
httpSafeOrigin: canonicalizeOrigin(config.httpSafeOrigin),
|
|
|
|
|
removeDonateButton: config.removeDonateButton,
|
|
|
|
|