bnsf
bnsf copied to clipboard
How can I get cookie for API server
Cookies for API server are stored inside bnsf, but I want to connect to API server directly by websockets and of course I lose my authorization because I don't have necessary cookies on the client. I remember that I have possibility to write my own controllers in bnsf (I think I can get my cookies this way) but there is no any docs about it.
I think:
- we should pay more attention to this issue and make cookies proxying more configurable
- need to write some docs about using controllers
Possible solution:
- Move cookieStorage out of apiRequester
- in app-kernel#_writeResponse:
- get all cookies for all hosts
- for each host:
- see if it's subdomain of front host
- if yes, see if it has some cookies for front host
- if yes, set send them via set-cookie headers