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

Commit 71386ca

Browse files
Merge branch 'develop' into staging
2 parents d16169a + f04310c commit 71386ca

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ jobs:
137137
- run: git config --global user.name "CircleCI"
138138
- run: ssh-keyscan github.com >> ~/.ssh/known_hosts
139139

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

packages/gluestick/shared/lib/__tests__/getHttpClient.test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@ describe('lib/getHttpClient', () => {
139139
});
140140

141141
it('should set baseURL with https if req.secure is true', () => {
142+
const host = 'hola.com:332211';
142143
const req = {
144+
hostname: host,
143145
headers: {
144146
cookie: 'name=Lincoln',
145-
host: 'hola.com:332211',
147+
host,
146148
},
147149
secure: true,
148150
};
@@ -153,10 +155,12 @@ describe('lib/getHttpClient', () => {
153155
});
154156

155157
it('should set baseURL with http if req.secure is false', () => {
158+
const host = 'hola.com:332211';
156159
const req = {
160+
hostname: host,
157161
headers: {
158162
cookie: 'name=Lincoln',
159-
host: 'hola.com:332211',
163+
host,
160164
},
161165
secure: false,
162166
};

packages/gluestick/shared/lib/getHttpClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default function getHttpClient(
4747
// If a request object is provided, then we want to merge the custom headers
4848
// with the headers that we sent from the browser in the request.
4949
client = httpClient.create({
50-
baseURL: protocol + req.headers.host,
50+
baseURL: protocol + req.hostname,
5151
headers: {
5252
...headers,
5353
},

0 commit comments

Comments
 (0)