Skip to content

Commit

Permalink
Merge pull request #7 from Hexaville/noppoMan-patch-2
Browse files Browse the repository at this point in the history
take over response headers from context
  • Loading branch information
noppoMan committed Jul 13, 2017
2 parents 843990d + d752c5b commit 8684bb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/HexavilleAuth/HexavilleAuth+Router.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ extension HexavilleAuth {
context.session?["hexaville.oauth_token"] = requestToken.oauthToken
let location = try provider.createAuthorizeURL(requestToken: requestToken).absoluteString

return Response(status: .found, headers: ["Location": location])
var headers = context.responseHeaders
headers["Location"] = location
return Response(status: .found, headers: headers)
}

router.use(.get, provider.oauth.callbackURL.path) { request, context in
Expand Down

0 comments on commit 8684bb6

Please sign in to comment.