Skip to content

Commit

Permalink
[xs] added user agent to differentiate request source
Browse files Browse the repository at this point in the history
  • Loading branch information
sagargg committed Jul 9, 2021
1 parent 777edd3 commit bde9e0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ module.exports.makeApp = function () {
config.get('API_URL'),
`package_search?rows=0`
)
const response = await fetch(url)
const response = await fetch(url, {
headers: { 'User-Agent': 'frontend-v2/latest (internal API call from frontend app)' }
})
if (response.ok) {
const body = await response.json()
if (body.success == true) {
Expand Down

0 comments on commit bde9e0f

Please sign in to comment.