This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add user agent and trailing slash (#1572)
* Add user agent and trailing slash * Download locales only once per workflow * Update src/locales/scripts/create-wp-locale-list.js Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com> * Update src/locales/scripts/get-translations.js Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com> * Update src/locales/scripts/get-translations-status.js Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com> * Extract network-service from locale scripts To enable setting the user agent string in a single place while keeping the scripts independent of each other * Update src/locales/scripts/network-service.js Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com> * Simplify axios module Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com> Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
- Loading branch information
1 parent
ed644b4
commit a3fdb15
Showing
6 changed files
with
63 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const axios = require('axios') | ||
|
||
const userAgent = | ||
'Openverse/0.1 (https://wordpress.org/openverse; openverse@wordpress.org)' | ||
|
||
module.exports = axios.create({ | ||
headers: { 'User-Agent': userAgent }, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters