Skip to content

fix: Amend CiviCRM-related mailing action endpoints to match expected path

stephen requested to merge adjust-newsletter-management-endpoint into main

As mentioned in #71 (closed), some mailing-related URLs have historically been routed away from CiviCRM servers (which should not be web-accessible) and to donate-related servers (which should), so that there can be an appropriate user-accessible "front end" for CiviCRM mailing actions.

In particular, this involves traffic coming to URLs with the pattern /civicrm/mailing/[action], and which carry several URL parameters in tow. The behavior performed on the old donate site, when it receives traffic like this, is to:

  1. Vet the action embedded in the URL
  2. Ensure required URL parameters are present
  3. Route any traffic without these necessary requirements to the standalone newsletter signup form
  4. Accept any traffic with all these requirements, signal to CiviCRM the intended action and include the passed-along URL parameters, and forward traffic to a related thank-you page (/unsubscribed/ for /civicrm/mailing/unsubscribe?foo=bar, etc)

Much of this capability was already present in donate-neo, but this MR ensures that the receiving URL for these mailing actions is correct - it was /mailing/ and is now /civicrm/mailing/.

Merge request reports