Static Forms - Secure form backend and form endpoint for contact formsStatic Forms - Secure form backend and form endpoint for contact forms
  • Home
  • Features
  • Docs
  • Blog
  • Pricing
Register
  • Home
  • Features
  • Docs
  • Blog
  • Pricing
Documentation

Learn how to use Static Forms

  • Introduction
  • Quick Start
  • Basic Setup
  • How It Works
  • Form Basics
  • API Key
  • Redirects
  • Overview
  • Honeypot Field
  • reCAPTCHA
  • Cloudflare Turnstile
  • hCaptcha
  • ALTCHA
  • Overview
  • Application Forms
  • Form Submissions
  • Webhooks
  • Auto Responders
  • Custom Email Templates
  • AI Reply
  • CC Emails
  • Branding & Custom Domain
  • File Uploads
  • Domain Restriction
  • Custom Subjects
  • Reply-To Address
  • Overview
  • Slack
  • Discord
  • Make
  • n8n
  • Google Sheets
  • Notion
  • Airtable
  • Overview
  • React
  • Next.js
  • Vue.js
  • Angular
  • Svelte
  • Astro
  • Plain HTML
  • Netlify
  • Vercel
  • Cloudflare Pages
  • GitHub Pages
  • WordPress
  • Webflow
  • Wix
  • Complete Reference
  • Account Settings
  • Pricing Plans
  • Overage Billing
  • Common Issues
  • Debugging
  • CORS Issues
  • Email Delivery
  • FAQ
  • Get Support
  • Changelog
Support
Troubleshooting

CORS Issues

Understanding and troubleshooting CORS with Static Forms

CORS (Cross-Origin Resource Sharing) is a browser security feature that controls which domains can make requests to your API. Static Forms supports CORS by default, allowing requests from any domain.

What is CORS?

CORS is a security mechanism that browsers use to restrict cross-origin HTTP requests. When your website (e.g., https://yoursite.com) makes a request to Static Forms API (https://api.staticforms.dev), the browser checks CORS headers to ensure the request is allowed.

Static Forms CORS Support

Static Forms API supports CORS by default:

  • All origins are allowed for form submissions
  • No additional configuration required
  • Works with AJAX/fetch requests
  • Supports all HTTP methods (POST, OPTIONS, etc.)

No CORS Configuration Needed

You don't need to configure anything for CORS. Static Forms accepts requests from any domain by default.

Common CORS Errors

If you see CORS errors, here's what they mean:

Error: "Access to fetch blocked by CORS policy"

This error typically means:

  • The request is being blocked by browser security
  • You're using the wrong URL
  • There's a network/proxy issue

Troubleshooting Steps

If you encounter CORS errors:

1

Verify the URL

Ensure you're using the correct endpoint: https://api.staticforms.dev/submit

2

Check Request Method

Verify you're using POST method (not GET).

3

Inspect Network Tab

Open browser DevTools → Network tab and check:

  • If the request is being made
  • What the actual error response is
  • Response headers
4

Check Browser Console

Look for the full error message in the browser console for more details.

AJAX/Fetch Requests

When making AJAX requests, ensure proper headers:

JavaScript

Preflight Requests

Browsers may send a preflight OPTIONS request before the actual POST request. Static Forms handles this automatically:

  • OPTIONS requests are automatically handled
  • Proper CORS headers are returned
  • No action required on your part

Testing CORS

To test if CORS is working:

JavaScript

Common Issues

CORS Error in Development

If testing on localhost, ensure you're using http://localhost (not file://). CORS doesn't apply to same-origin requests.

Proxy or CDN Issues

Some proxies or CDNs may interfere with CORS headers. Check if your hosting provider modifies CORS headers.

Browser Extensions

Some browser extensions (ad blockers, privacy tools) may interfere with CORS. Try disabling extensions or using incognito mode.

Still Having Issues?

If you're still experiencing CORS errors, check the Troubleshooting guide or contact support.

Previous
Debugging
Next
Email Delivery

Documentation

  • Introduction
  • Quick Start
  • Basic Setup
  • How It Works
  • Form Basics
  • API Key
  • Redirects
  • Overview
  • Honeypot Field
  • reCAPTCHA
  • Cloudflare Turnstile
  • hCaptcha
  • ALTCHA
  • Overview
  • Application Forms
  • Form Submissions
  • Webhooks
  • Auto Responders
  • Custom Email Templates
  • AI Reply
  • CC Emails
  • Branding & Custom Domain
  • File Uploads
  • Domain Restriction
  • Custom Subjects
  • Reply-To Address
  • Overview
  • Slack
  • Discord
  • Make
  • n8n
  • Google Sheets
  • Notion
  • Airtable
  • Overview
  • React
  • Next.js
  • Vue.js
  • Angular
  • Svelte
  • Astro
  • Plain HTML
  • Netlify
  • Vercel
  • Cloudflare Pages
  • GitHub Pages
  • WordPress
  • Webflow
  • Wix
  • Complete Reference
  • Account Settings
  • Pricing Plans
  • Overage Billing
  • Common Issues
  • Debugging
  • CORS Issues
  • Email Delivery
  • FAQ
  • Get Support
  • Changelog
Static Forms - Secure form backend and form endpoint for contact formsStatic Forms - Secure form backend and form endpoint for contact forms

The fastest way to add working contact forms to any website. No backend required.

Product

  • Features
  • Pricing
  • Documentation
  • Changelog

Resources

  • Blog
  • Examples
  • Templates
  • Tools
  • Integrations
  • reCAPTCHA Guide
  • FAQ

Alternatives

  • All Alternatives
  • Formspree
  • Netlify Forms
  • Typeform
  • Formspark

Company

  • Contact
  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • DPA

© 2026 Static Forms. All rights reserved.

Committed to sustainability