Skip to content
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

chore: Require HTTPS webhook URLs #745

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arcoraven
Copy link
Contributor

@arcoraven arcoraven commented Oct 30, 2024

PR-Codex overview

This PR primarily focuses on updating webhook validation to enforce HTTPS URLs, renaming functions and schemas for clarity, and enhancing the webhook creation process.

Detailed summary

  • Changed isValidHttpUrl to isValidWebhookUrl and updated its logic to only accept HTTPS URLs.
  • Renamed createWebhook to createWebhookRoute for clarity.
  • Updated webhook examples to reflect new naming and structure.
  • Adjusted the active property logic in the toWebhookSchema function.
  • Added tests for isValidWebhookUrl to ensure correct functionality.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

const url = new URL(urlString);
return url.protocol === "http:" || url.protocol === "https:";
const url = new URL(input);
return url.protocol === "https:";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removes http: as a valid protocol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant