Skip to content

Instantly share code, notes, and snippets.

@ideadude
Last active August 12, 2023 06:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ideadude/f11ec3c3f8a46444434dfb6affe1352d to your computer and use it in GitHub Desktop.
Save ideadude/f11ec3c3f8a46444434dfb6affe1352d to your computer and use it in GitHub Desktop.
htaccess rules to use unix password but allow Stripe and PayPal webhooks/IPNs to go through
# Stripe Webhook IPs via https://stripe.com/docs/ips#webhook-notifications
# v create a user/pass in this folder using htpasswd v
AuthUserFile /var/www/vhosts/domain.com/conf/.htpasswd
# ^^
AuthType Basic
AuthName "Authentication Required"
Require valid-user
Order allow,deny
Allow from 3.18.12.63
Allow from 3.130.192.231
Allow from 13.235.14.237
Allow from 13.235.122.149
Allow from 18.211.135.69
Allow from 35.154.171.200
Allow from 52.15.183.38
Allow from 54.88.130.119
Allow from 54.88.130.237
Allow from 54.187.174.169
Allow from 54.187.205.235
Allow from 54.187.216.72
satisfy any
@laurenhagan0306
Copy link

This recipe is included in the blog post on "Allowing Gateway Webhooks or IPN Data into a Protected Site (for testing or development)" at Paid Memberships Pro here: https://www.paidmembershipspro.com/allowing-gateway-webhooks-or-ipn-data-into-a-protected-site-for-testing-or-development/

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