Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Commit

Permalink
Merge branch 'develop' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
christinebrass committed Jan 15, 2019
2 parents d16169a + f04310c commit 71386ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
- run: git config --global user.name "CircleCI"
- run: ssh-keyscan github.com >> ~/.ssh/known_hosts

- run: docker pull node:8-slim
- run: docker pull node:8-jessie-slim
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- run: BRANCH=$CIRCLE_BRANCH npm run publish -- $CIRCLE_TAG

Expand Down
8 changes: 6 additions & 2 deletions packages/gluestick/shared/lib/__tests__/getHttpClient.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ describe('lib/getHttpClient', () => {
});

it('should set baseURL with https if req.secure is true', () => {
const host = 'hola.com:332211';
const req = {
hostname: host,
headers: {
cookie: 'name=Lincoln',
host: 'hola.com:332211',
host,
},
secure: true,
};
Expand All @@ -153,10 +155,12 @@ describe('lib/getHttpClient', () => {
});

it('should set baseURL with http if req.secure is false', () => {
const host = 'hola.com:332211';
const req = {
hostname: host,
headers: {
cookie: 'name=Lincoln',
host: 'hola.com:332211',
host,
},
secure: false,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/gluestick/shared/lib/getHttpClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function getHttpClient(
// If a request object is provided, then we want to merge the custom headers
// with the headers that we sent from the browser in the request.
client = httpClient.create({
baseURL: protocol + req.headers.host,
baseURL: protocol + req.hostname,
headers: {
...headers,
},
Expand Down

0 comments on commit 71386ca

Please sign in to comment.