Skip to content

Commit 69b89c5

Browse files
authored
fix: Handle re-written URLs in HTTP signature validation (#196)
1 parent 7359590 commit 69b89c5

File tree

3 files changed

+491
-161
lines changed

3 files changed

+491
-161
lines changed

lib/smart-app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,12 @@ class SmartApp {
394394
return this._handleCallback(request.body, responders.httpResponder(response, this._log))
395395
}
396396

397+
// Work-around to issue with http-signature
398+
// See also: https://github.com/joyent/node-http-signature/issues/87
399+
if (request.originalUrl) {
400+
request.url = request.originalUrl
401+
}
402+
397403
const isAuthorized = await this._authorizer.isAuthorized(request)
398404
if (isAuthorized) {
399405
return this._handleCallback(request.body, responders.httpResponder(response, this._log))

0 commit comments

Comments
 (0)