Skip to content

Commit

Permalink
patch issue from Meteor.absoluteUrl() returning always localhost in d…
Browse files Browse the repository at this point in the history
…evelopment mode (see #1554)
  • Loading branch information
xavxyz committed Feb 10, 2017
1 parent bf51a05 commit 6833b35
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/nova-lib/lib/modules/apollo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ const createMeteorNetworkInterface = (givenConfig = {}) => {
path = path.slice(1);
}

// For SSR
const url = Meteor.absoluteUrl(path);
// add the rootUrl option, in case tests are made on development server
// see https://github.com/TelescopeJS/Telescope/issues/1554#issuecomment-277445915
const uri = Meteor.absoluteUrl(
path,
{ rootUrl: getSetting('developmentServerIp', Meteor.absoluteUrl()) }
);
const networkInterface = createNetworkInterface({
uri: url,
uri,
opts: {
credentials: 'same-origin',
}
Expand Down

0 comments on commit 6833b35

Please sign in to comment.