Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function fastbootExpressMiddleware(distPath, options) {
let statusMessage = result.error ? 'NOT OK ' : 'OK ';

for (var pair of headers.entries()) {
res.set(pair[0], pair[1]);
res.append(pair[0], pair[1]);
}

if (result.error) {
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
define('~fastboot/app-factory', ['multivalue-headers/app', 'multivalue-headers/config/environment'], function(App, config) {
App = App['default'];
config = config['default'];

return {
'default': function() {
return App.create(config.APP);
}
};
});

define("multivalue-headers/initializers/ajax", ["exports"], function (_exports) {
"use strict";

Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;
const {
get
} = Ember;

var nodeAjax = function (options) {
let httpRegex = /^https?:\/\//;
let protocolRelativeRegex = /^\/\//;
let protocol = get(this, 'fastboot.request.protocol');

if (protocolRelativeRegex.test(options.url)) {
options.url = protocol + options.url;
} else if (!httpRegex.test(options.url)) {
try {
options.url = protocol + '//' + get(this, 'fastboot.request.host') + options.url;
} catch (fbError) {
throw new Error('You are using Ember Data with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: ' + fbError.message);
}
}

if (najax) {
najax(options);
} else {
throw new Error('najax does not seem to be defined in your app. Did you override it via `addOrOverrideSandboxGlobals` in the fastboot server?');
}
};

var _default = {
name: 'ajax-service',
initialize: function (application) {
application.register('ajax:node', nodeAjax, {
instantiate: false
});
application.inject('adapter', '_ajaxRequest', 'ajax:node');
application.inject('adapter', 'fastboot', 'service:fastboot');
}
};
_exports.default = _default;
});
define("multivalue-headers/initializers/error-handler", ["exports"], function (_exports) {
"use strict";

Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.default = void 0;

/**
* Initializer to attach an `onError` hook to your app running in fastboot. It catches any run loop
* exceptions and other errors and prevents the node process from crashing.
*
*/
var _default = {
name: 'error-handler',
initialize: function () {
if (!Ember.onerror) {
// if no onerror handler is defined, define one for fastboot environments
Ember.onerror = function (err) {
const errorMessage = `There was an error running your app in fastboot. More info about the error: \n ${err.stack || err}`;
console.error(errorMessage);
};
}
}
};
_exports.default = _default;
});//# sourceMappingURL=multivalue-headers-fastboot.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
Loading