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