mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Specify user agent to avoid being detected as a "bot" by backend
(cherry picked from commit 72cda41731
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
f3f87dc928
commit
042c0f06f1
@@ -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 },
|
||||
|
Reference in New Issue
Block a user