@adobe/spacecat-shared-utils 1.22.5 → 1.22.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/url-helpers.js +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-utils-v1.22.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.22.5...@adobe/spacecat-shared-utils-v1.22.6) (2024-11-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* resolving url when site has bot protection ([#442](https://github.com/adobe/spacecat-shared/issues/442)) ([2730271](https://github.com/adobe/spacecat-shared/commit/273027155a982719429c14fd94f7b4867f17f094))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-utils-v1.22.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.22.4...@adobe/spacecat-shared-utils-v1.22.5) (2024-11-11)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/url-helpers.js
CHANGED
|
@@ -85,7 +85,12 @@ function composeBaseURL(domain) {
|
|
|
85
85
|
|
|
86
86
|
async function composeAuditURL(url) {
|
|
87
87
|
const urlWithScheme = prependSchema(url);
|
|
88
|
-
const resp = await fetch(urlWithScheme
|
|
88
|
+
const resp = await fetch(urlWithScheme, {
|
|
89
|
+
method: 'GET',
|
|
90
|
+
headers: {
|
|
91
|
+
'User-Agent': 'curl/7.88.1',
|
|
92
|
+
},
|
|
93
|
+
});
|
|
89
94
|
const finalUrl = resp.url.split('://')[1];
|
|
90
95
|
return stripTrailingSlash(finalUrl);
|
|
91
96
|
}
|