Skip to content

Commit 314e416

Browse files
committed
#147 fix headers for searches
1 parent 42fa8b4 commit 314e416

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

serverless/lib/CaseSearchProcessor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,9 @@ export async function fetchCaseIdFromPortal(caseNumber: string, cookieJar: Cooki
365365
withCredentials: true,
366366
headers: {
367367
...PortalAuthenticator.getDefaultRequestHeaders(userAgent),
368-
Origin: portalUrl,
369368
'Content-Type': 'application/x-www-form-urlencoded',
369+
Origin: portalUrl,
370+
Referer: 'https://portal-nc.tylertech.cloud/Portal/Home/Dashboard/29',
370371
},
371372
});
372373

serverless/lib/PortalAuthenticator.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ const DEFAULT_USER_AGENT =
2828
export function getDefaultRequestHeaders(userAgent?: string): Record<string, string> {
2929
return {
3030
'User-Agent': userAgent || DEFAULT_USER_AGENT,
31-
Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
31+
Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
32+
'Accept-Encoding': 'gzip, deflate, br, zstd',
3233
'Accept-Language': 'en-US,en;q=0.9',
34+
'Cache-Control': 'max-age=0',
3335
};
3436
}
3537

0 commit comments

Comments
 (0)