From b3a96cd0e7a5060779fc329562cc16f02cf9cdd4 Mon Sep 17 00:00:00 2001 From: Godzil Date: Mon, 27 Apr 2020 22:34:13 +0100 Subject: [PATCH] Let's make the headers a bit better. --- src/my_request.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/my_request.ts b/src/my_request.ts index 17a2d9e..07dce01 100644 --- a/src/my_request.ts +++ b/src/my_request.ts @@ -390,6 +390,9 @@ function getOptions(config: IConfig, form: any) currentOptions = {}; currentOptions.headers = {}; + currentOptions.headers['Cache-Control'] = 'private'; + currentOptions.headers.Accept = 'application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5'; + if (config.userAgent) { currentOptions.headers['User-Agent'] = config.userAgent; @@ -406,7 +409,6 @@ function getOptions(config: IConfig, form: any) currentOptions.decodeEmails = true; currentOptions.jar = j; - optionsSet = true; }