sane version
0.1.0-beta.2
I was trying to use the socket adapter from @huafu I got stock in a part where it says invalid token < on _getcookie, after talking to @huafu he said I shouldn't deactivate the corsforcookies option which skips csrf token generation because it is insecure. then I tried to request the api for the token myself and I saw that I can't get a token from /csrfToken no mater how I configure config.csrf object. it will always print the template of the home page of the api which says:
Welcome to your backend!
When deploying replace this with your great ember app. In the meantime access your api at 'api/v1/models' and your ember app at localhost:4200.
so I tried running a new sails app and configure the csrf and it does return the json with the token like this:
{'_csrf':'thetokenhash'}
, so there is someting wrong with the handler of /csrfToken in the version of sails on sane. it just doesn't deliver the token.
I was trying to use the socket adapter from @huafu I got stock in a part where it says invalid token < on _getcookie, after talking to @huafu he said I shouldn't deactivate the corsforcookies option which skips csrf token generation because it is insecure. then I tried to request the api for the token myself and I saw that I can't get a token from /csrfToken no mater how I configure config.csrf object. it will always print the template of the home page of the api which says:
so I tried running a new sails app and configure the csrf and it does return the json with the token like this:
{'_csrf':'thetokenhash'}, so there is someting wrong with the handler of /csrfToken in the version of sails on sane. it just doesn't deliver the token.