mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-17 22:00:00 +00:00
a2216510b7
usage: - create cookies.json file somewhere, preferrably outside cobalt directory - in docker, you can bind mount it (`volumes` in composefile) - if you don't want cobalt to update the cookies, set it to `:ro` (cobalt will print a warning about this, ignore it) - set COOKIE_PATH to the absolute path of this file - enjoy? usage in services: probably the simplest api ever - import { getCookie, updateCookie } from '../../cookie/manager.js'; - const cookie = getCookie('<service_name>'); - add this to headers - `headers: { cookie }` - after fetch is done, save potential cookie updates: updateCookie(cookie, fetch.headers) - see instagram.js for example usage
23 lines
195 B
Text
23 lines
195 B
Text
# npm
|
|
node_modules
|
|
package-lock.json
|
|
|
|
# secrets
|
|
.env
|
|
|
|
# page build
|
|
min
|
|
build
|
|
|
|
# stuff i already made but delayed
|
|
future
|
|
|
|
# docker
|
|
docker-compose.yml
|
|
|
|
# vscode
|
|
.vscode
|
|
|
|
# cookie file
|
|
cookies.json
|