Skip to content

Commit bde9e0f

Browse files
committed
[xs] added user agent to differentiate request source
1 parent 777edd3 commit bde9e0f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ module.exports.makeApp = function () {
132132
config.get('API_URL'),
133133
`package_search?rows=0`
134134
)
135-
const response = await fetch(url)
135+
const response = await fetch(url, {
136+
headers: { 'User-Agent': 'frontend-v2/latest (internal API call from frontend app)' }
137+
})
136138
if (response.ok) {
137139
const body = await response.json()
138140
if (body.success == true) {

0 commit comments

Comments
 (0)