Skip to content

Conversation

@dipratap
Copy link
Contributor

@dipratap dipratap commented Jan 6, 2026

@github-actions
Copy link

github-actions bot commented Jan 6, 2026

This PR will trigger a patch release when merged.

@dipratap dipratap requested a review from nit23uec January 6, 2026 12:26
export function calculateForwardedHost(url, logger = console) {
try {
const urlObj = new URL(url);
const forwardedHost = urlObj.hostname.replace(/^www\./, '');
Copy link
Contributor

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');
Copy link
Contributor

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);
Copy link
Contributor

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(),
Copy link
Contributor

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)

Copy link
Contributor Author

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.

@dipratap dipratap merged commit fe66bd6 into main Jan 7, 2026
7 checks passed
@dipratap dipratap deleted the edge-td branch January 7, 2026 05:45
solaris007 pushed a commit that referenced this pull request Jan 7, 2026
# [@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))
@solaris007
Copy link
Member

🎉 This PR is included in version @adobe/spacecat-shared-data-access-v2.92.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

solaris007 pushed a commit that referenced this pull request Jan 7, 2026
# [@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))
@solaris007
Copy link
Member

🎉 This PR is included in version @adobe/spacecat-shared-tokowaka-client-v1.4.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants