Skip to content

Commit

Permalink
Ensure auth header url uses correct protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneRifle committed Jan 18, 2019
1 parent 895fcbc commit c8a04a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function config (app, { showLoginPage, serviceProvider, idpConfig, port }) {
? `${req.hostname}:${port}`
: req.hostname

authHeaderFields.url = `http://${hostPort}${req.baseUrl}${req.path}`
authHeaderFields.url = `${req.protocol}://${hostPort}${req.baseUrl}${req.path}`
authHeaderFields.requestedAttributes = req.query.attributes

if (verifyMyInfoSignature(authHeaderFields.signature, authHeaderFields)) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opengovsg/mockpass",
"version": "1.2.0",
"version": "1.2.1",
"description": "A mock SingPass/CorpPass server for dev purposes",
"main": "index.js",
"bin": {
Expand Down

0 comments on commit c8a04a9

Please sign in to comment.