UNPKG

@calvin_von/cookie-plugin-toolkit

Version:

A dalao-proxy plugin for auto-fetch cookies

32 lines (28 loc) 514 B
const defaultOptions = { // groups: false, routes: [], platform: '', refreshOnStart: false, attachField: 'cookie', /** @type {('header'|'body'|'query')[] } */ attachAt: ['header'], /** @type {import('./types').Adapter} */ adapter: {}, }; function setting() { return { defaultEnable: true, optionsField: 'cookie', enableField: 'enable', } } function parser(rawUserConfig) { return { ...defaultOptions, ...rawUserConfig }; } module.exports = { setting, parser };