# Astro, fix Form error “Content-Type was not one of…”

> Fix the Astro form error 'Content-Type was not one of...' by enabling server-side rendering with output: server, or setting prerender = false on the page.

Author: Flavio Copes | Published: 2025-01-20 | Canonical: https://flaviocopes.com/astro-fix-form-error-content-type-was-not-one-of/

Working on a form with [Astro](https://flaviocopes.com/astro-introduction/), I got this error when submitting it:

```typescript
Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".
```

Turns out, the site was not server-side rendered, and/or the page was not hybrid.

I added `output: 'server'` in the Astro config in `astro.config.mjs`:

```javascript
// @ts-check
import { defineConfig } from 'astro/config'

// https://astro.build/config
export default defineConfig({
  output: 'server'
})
```

I could have also added

```typescript
export const prerender = false
```

at the top of the file that included the form (and handled form submission)
