Skip to content

Commit

Permalink
Specify user agent to avoid being detected as a "bot" by backend
Browse files Browse the repository at this point in the history
  • Loading branch information
tdonohue committed Nov 8, 2023
1 parent 7dcaae8 commit 72cda41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ function generateViewEvent(uuid: string, dsoType: string): void {
[XSRF_REQUEST_HEADER] : csrfToken,
// use a known public IP address to avoid being seen as a "bot"
'X-Forwarded-For': '1.1.1.1',
// Use a user-agent of a Firefox browser on Windows. This again avoids being seen as a "bot"
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0',
},
//form: true, // indicates the body should be form urlencoded
body: { targetId: uuid, targetType: dsoType },
Expand Down

0 comments on commit 72cda41

Please sign in to comment.