Skip to content

Commit

Permalink
Added option to force protocol to https
Browse files Browse the repository at this point in the history
  • Loading branch information
aultac committed Apr 12, 2020
1 parent 5f0053b commit 70f575e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ function wellKnownJSON (options, resources) {
var m = req.path.match(WELL_KNOWN)
var base =
options.baseUri ||
(req.headers['x-forwarded-proto'] || req.protocol) +
(options.forceProtocol ||
req.headers['x-forwarded-proto'] ||
req.protocol) +
'://' +
(req.headers['x-forwarded-host'] || req.headers.host)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oada/well-known-json",
"version": "1.0.0",
"version": "1.0.1",
"description": "Middleware for JSON Well-Known resources",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 70f575e

Please sign in to comment.