-
Notifications
You must be signed in to change notification settings - Fork 468
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
safari can not request cors. #52
Comments
@breaklee what error are you seeing in Safari? |
@troygoode there are no errors. every request has different session id. |
@breaklee are you requesting a session across domains? ie: on, google.com requesting login & a page from youtube.com (subdomains may also have issues depending on cookie settings)? I think this might be more over an express-session issue. |
@breaklee is this happening on localhost, or in production? if in production, are you serving it over HTTPS? (wondering if this is related to #45) |
blow is my cors option.
cors : function() {
return {
origin : function(origin, callback) {
callback(null, origin === undefined || config.isWhiteList(origin)/always true/);
},
credentials : true,
methods : ["GET", "POST", "DELETE", "PUT", "UPDATE", "OPTIONS", "HEAD"],
exposedHeaders : ['Origin', 'Upgrade', 'Content-Encoding', 'Content-Range', 'Accept-Ranges', 'Range', 'Content-Type', 'Authorization',
'X-Forwarded-For', 'Connection', 'Host', 'Content-Length', 'X-Real-IP', 'X-Requested-With', 'Set-Cookie', 'Cookie'],
allowedHeaders : ['Origin', 'Upgrade', 'Content-Encoding', 'Content-Range', 'Accept-Ranges', 'Range', 'Content-Type', 'Authorization',
'X-Forwarded-For', 'Connection', 'Host', 'Content-Length', 'X-Real-IP', 'X-Requested-With', 'Set-Cookie', 'Cookie']
}
}
and this is used as middleware
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended : false }));
app.use(cookieParser());
app.use(cors(config.cors()));
app.use(sessionStore(app, config));
it works fine chrome env. but not working in safari.
( always refresh cookie values in safari )
how can i handle this?
The text was updated successfully, but these errors were encountered: