bnsf icon indicating copy to clipboard operation
bnsf copied to clipboard

How can I get cookie for API server

Open jifeon opened this issue 10 years ago • 1 comments

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:

  1. we should pay more attention to this issue and make cookies proxying more configurable
  2. need to write some docs about using controllers

jifeon avatar Mar 18 '15 20:03 jifeon

Possible solution:

  1. Move cookieStorage out of apiRequester
  2. 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

jifeon avatar Apr 29 '15 06:04 jifeon