Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lib/oauth_middleware.js #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leiwan5
Copy link

@leiwan5 leiwan5 commented Feb 16, 2013

应用在使用https时有点问题,自己定义homeUrl虽然可以解决问题但不爽,:)

@@ -34,7 +34,7 @@ function login(req, res, next, options) {
var blogtype = req.query[blogtypeField];
var referer = getReferer(req, options);
if (!options.homeUrl) {
options.homeUrl = 'http://' + req.headers.host;
options.homeUrl = req.socket.headers.scheme + '://' + req.headers.host;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

req.headers.scheme? 如果 schme 为空,是否默认 http 呢?

@leiwan5
Copy link
Author

leiwan5 commented Feb 16, 2013

那就

options.homeUrl = (req.socket.headers.scheme || 'http') + '://' + req.headers.host;

这个会没有吗?

@fengmk2
Copy link
Member

fengmk2 commented Feb 16, 2013

@Danielking ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants