Cloudflare strips external domains from form action attribute?

Hey guys, I am running into a problem with HTML forms. On a form action with an external link like so: <form method="POST" action="https://buttondown.email/api/emails/"> In production the action is being stripped like so: <form method="POST"> I have tested my static site locally and it maintains the action but in Cloudflare Page it strips it. Is there a configuration setting in Cloudflare that is stripping this form action?
2 Replies
savtrip
savtripOP12mo ago
For anyone out there with the same issue my _middleware.ts plugin for static forms was removing the form action. The plugin seems to not follow it's stated functionality that it only targets forms marked with static but instead it targets every form: https://github.com/cloudflare/pages-plugins/issues/39
GitHub
Static Forms and Mailchannels Plugin breaking other forms · Issue #...
While the documentation says these plugins "intercept all form submissions made which have the data-static-form-name attribute set", they were breaking the search function and other forms...
savtrip
savtripOP12mo ago
GitHub
Fix onRequestGet to target only forms with data-static-form-name by...
Hi @GregBrimble, this closes issue #39 As stated in the docs: The Static Forms Pages Plugin intercepts all form submissions made which have the data-static-form-name attribute set. This allows you ...
Want results from more Discord servers?
Add your server