-
Notifications
You must be signed in to change notification settings - Fork 15
fix: fetch api key from s3 and fix invalidation sequence #1251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This PR will trigger a patch release when merged. |
| export function calculateForwardedHost(url, logger = console) { | ||
| try { | ||
| const urlObj = new URL(url); | ||
| const forwardedHost = urlObj.hostname.replace(/^www\./, ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forwarded host is typica lly of format: www.adobe.com where apex domain is there, else it is with subdomain, like: blog.adobe.com
|
|
||
| it('should remove www prefix from hostname', async () => { | ||
| const result = calculateForwardedHost('https://www.example.com/page', log); | ||
| expect(result).to.equal('example.com'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should result in www.example.com
| }); | ||
|
|
||
| it('should remove www prefix from hostname', async () => { | ||
| const result = calculateForwardedHost('https://www.example.com/page', log); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if its https://example.com/page, then forwarded host should be: www.example.com
| }).optional(), | ||
| tokowakaConfig: Joi.object({ | ||
| apiKey: Joi.string().required(), | ||
| apiKey: Joi.string().optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would need enabled prop and removal of the existing props (step wise)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this will be fixed in the next related issue I am picking tomorrow.
# [@adobe/spacecat-shared-data-access-v2.92.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.92.0...@adobe/spacecat-shared-data-access-v2.92.1) (2026-01-07) ### Bug Fixes * fetch api key from s3 and fix invalidation sequence ([#1251](#1251)) ([fe66bd6](fe66bd6))
|
🎉 This PR is included in version @adobe/spacecat-shared-data-access-v2.92.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [@adobe/spacecat-shared-tokowaka-client-v1.4.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-tokowaka-client-v1.4.4...@adobe/spacecat-shared-tokowaka-client-v1.4.5) (2026-01-07) ### Bug Fixes * fetch api key from s3 and fix invalidation sequence ([#1251](#1251)) ([fe66bd6](fe66bd6))
|
🎉 This PR is included in version @adobe/spacecat-shared-tokowaka-client-v1.4.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes https://github.com/adobe-rnd/tokowaka-worker/issues/455, https://github.com/adobe-rnd/tokowaka-worker/issues/459