Add JS redirect endpoint /#[email protected] => /example.org
In some mail merge software there are email variables inserting the user's email address.
Currently there is an option to link to https://internet.nl/mail/[email protected], however this has two problems:
- Mail/anti-spam software will trigger a lot of scans (since these are done on GET).
- This leaks the 'private'-part to the webserver.
Of course the best solution would be to make a new variable with just the domain name, however this is not always easy or possible (e.g. in external merge software), this also doesn't solve the first problem with triggering scans.
Another solution would be moving the private data the hash part of the URL and using JS to extract the domain a @, e.g. https://internet.nl/mail/#[email protected] :arrow_right: https://internet.nl/mail/example.org/.
Ideally this would be done using a <form method="POST"> and a JS auto-submit. This will prevent normal mail/anti-spam software to follow the link.
Sample implementation https://github.com/bwbroersma/gh1045-js-post-hash/
e.g.: https://bwbroersma.github.io/gh1045-js-post-hash/#[email protected]