-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Globally disabling cookies? #841
Comments
What you want is to set
and in
|
Thanks for the tip, that seems to work. It would be nice if this was a more configurable option though. |
Good call--we'll take a look at that! |
If your starting point is Sails and then you start to remove a lot of default options, then maybe your starting building block should be just plain Express and then add only what you need. API developer here. |
When disabling sessions for individual requests, it's done by deleting the session field from the request. (See balderdashy#841). Unfortunately, the REST-over-WebSocket code assumed that the session was always there. This patch checks for the existence of req.session before calling req.session.save.
When disabling sessions for individual requests, it's done by deleting the session field from the request. (See balderdashy#841). Unfortunately, the REST-over-WebSocket code assumed that the session was always there. This patch checks for the existence of req.session before calling req.session.save.
+1 |
@sgress454 Was this ever made configurable? |
I would also like to know the same. Right now what I do is remove the cookieParser middleware, to not allow reading, but would be nice to also remove setting. Also, do sockets work without cookies, I'm having socket issues right now, but don't know if that's the issue as of yet. |
+1 |
You can disable sessions in Sails, that should disable cookies. Add the code below in your
Source: http://sailsjs.org/documentation/reference/configuration/sails-config-session#?disabling-sessions |
I'm creating an API and I am trying to figure out how to disable cookies in my application. We will be using headers for authentication of our API and have no need for cookies.
I was expecting that not having a session config or setting
module.exports.session = null
would do the trick, but that does not seem to be the case.The text was updated successfully, but these errors were encountered: