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

webhooks: Update CORS policy #21736

Merged
merged 2 commits into from
Sep 14, 2023
Merged

Conversation

ParkMyCar
Copy link
Member

This PR updates the CORS policy for the webhook endpoint to explicitly support all origins by mirroring the origin in the request, and limiting to just POST requests.

Note: I chatted with Matt Arthur about this and he signed off on it.

Motivation

@bobbyiliev was working on a tool that can take a sample JSON blob and send faked data with that same schema. But he was encountering CORS issues related to localhost. This change to the CORS policy should be more permissive and allow a tool like Bobby's to work without issue.

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered.
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • This PR includes the following user-facing behavior changes:
    • Relaxes the CORS policy for the webhook API.

@ParkMyCar ParkMyCar enabled auto-merge (squash) September 13, 2023 20:57
@ParkMyCar ParkMyCar merged commit 20b9041 into MaterializeInc:main Sep 14, 2023
@ParkMyCar ParkMyCar deleted the webhooks/cors branch October 16, 2023 18:47
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.

3 participants