-
Notifications
You must be signed in to change notification settings - Fork 19
Compare host against known urls #216
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
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.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.
Pull Request Overview
This PR modifies the custom API host detection logic to use a whitelist approach instead of comparing against a single default API host. The change compares the API host against a list of supported Adobe annotation endpoints to determine if it's custom.
- Changes custom API host detection from single default comparison to whitelist validation
- Adds debug logging for both API host and hostname custom detection
- Includes a commented test case for future investigation of package action issues
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/utils.js | Updates custom API host detection logic to use whitelist approach and adds debug logging |
| test/utils.test.js | Adds commented test case documenting known issue with non-default package actions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
shazron
left a comment
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.
Tested with a project, looks good
Description
This PR modifies the logic for determining whether an API host is custom by comparing against a list of supported Adobe annotation endpoints instead of comparing against a default API host.
Changes the custom API host detection logic to use a whitelist approach
Adds debug logging for both custom API host and hostname detection
Related Issue
https://jira.corp.adobe.com/browse/ACNA-3977
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: