Skip to content

Instantly share code, notes, and snippets.

View W4JEW's full-sized avatar

JeffH - W4JEW W4JEW

  • Atlanta, GA
  • 18:33 (UTC -04:00)
View GitHub Profile
@W4JEW
W4JEW / index.html
Created June 7, 2024 00:46 — forked from maxkostinevich/index.html
Cloudflare Worker - Handle Contact Form
<!--
/*
* Serverless contact form handler for Cloudflare Workers.
* Emails are sent via Mailgun.
*
* Learn more at https://maxkostinevich.com/blog/serverless-contact-form
* Live demo: https://codesandbox.io/s/serverless-contact-form-example-x0neb
*
* (c) Max Kostinevich / https://maxkostinevich.com
*/
@W4JEW
W4JEW / mta-sts.js
Created April 10, 2023 03:14 — forked from Tugzrida/mta-sts.js
MTA-STS Cloudflare worker
// This worker is designed to be able to neatly handle MTA-STS policies for multiple domains.
// Make a new worker with this script and add your domains to the stsPolicies dict like the example.
// Add a DNS AAAA record for mta-sts.yourdomain.com pointing to 100:: and set to proxied,
// then add a workers route for mta-sts.yourdomain.com/* pointing to this worker.
// You'll still need to manually add the appropriate _mta-sts.yourdomain.com TXT record to enable the policy,
// and the _smtp._tls.yourdomain.com TXT record for reporting.
const stsPolicies = {