Skip to content

[Mailer][Postmark][Webhook] Fix webhook testing in dockerized setups #53869

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

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

aleho
Copy link
Contributor

@aleho aleho commented Feb 8, 2024

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
License MIT

Adding "127.0.0.1" to webhooks doesn't always cut it. Testing in e.g. dockerized setups the IP address will most certainly not be 127.0.0.1 when testing requests originate from the host.

I wasn't sure whether this is a bug or a feature. For us it's a bug (we cannot test webhooks here, if "test" means testing in our development environment). On the other hand, it could also be a feature (and "127.0.0.1" removed completely), if by "testing" only the Symfony tests were meant.

What do you think? Bug? Feature?

@carsonbot carsonbot added this to the 6.4 milestone Feb 8, 2024
@carsonbot carsonbot changed the title [Mailer][Postmark][Webhook] Fix webhook testing in dockerized setups [Mailer][Webhook] [Postmark] Fix webhook testing in dockerized setups Feb 8, 2024
Adding "127.0.0.1" to webhooks doesn't always cut it. Testing in e.g.
dockerized setups the IP address will most certainly not be 127.0.0.1
when testing requests originate from the host.
@aleho aleho force-pushed the postmark-webhook-ips branch from 22f0d4d to 5a2bcdd Compare February 8, 2024 17:32
@aleho aleho changed the title [Mailer][Webhook] [Postmark] Fix webhook testing in dockerized setups [Mailer][Postmark][Webhook] Fix webhook testing in dockerized setups Feb 8, 2024
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

Works for me as a bugfix, the hardcoding is too rigid.

@carsonbot carsonbot changed the title [Mailer][Postmark][Webhook] Fix webhook testing in dockerized setups [Mailer][Webhook] [Postmark] Fix webhook testing in dockerized setups Feb 9, 2024
@aleho aleho changed the title [Mailer][Webhook] [Postmark] Fix webhook testing in dockerized setups [Mailer][Postmark][Webhook] Fix webhook testing in dockerized setups Feb 9, 2024
@nicolas-grekas
Copy link
Member

Thank you @aleho.

@nicolas-grekas nicolas-grekas merged commit 3d832bd into symfony:6.4 Feb 9, 2024
@aleho aleho deleted the postmark-webhook-ips branch February 9, 2024 13:00
This was referenced Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants