Skip to content

Commit

Permalink
feat: deduce domain protocol from connection (#217)
Browse files Browse the repository at this point in the history
* deps: update babel-eslint to version 6.1.1 (#204)

https://greenkeeper.io/

* deps: update rollup to version 0.33.2 (#205)

https://greenkeeper.io/

* deps: update babel-eslint to version 6.1.2 (#206)

https://greenkeeper.io/

* deps: update rollup to version 0.34.0 (#210)

https://greenkeeper.io/

* Deduce domain protocol from connection

* rollup version 0.34.1
  • Loading branch information
kureuil authored and zacharygolba committed Jul 16, 2016
1 parent cb5e45d commit 4247194
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/packages/route/utils/create-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,15 @@ export default function createAction(
params: {
page,
include
},

connection: {
encrypted
}
} = req;

const domain = `http://${headers.get('host')}`;
const protocol = encrypted ? 'https' : 'http';
const domain = `${protocol}://${headers.get('host')}`;

let total;
let { params: { fields } } = req;
Expand Down

0 comments on commit 4247194

Please sign in to comment.