# Tighten headers, cookies and cross-origin rules

> CORS was set to allow everything to make an error go away, and it stayed that way.

Web page: https://buildladder.com/resources/prompts/headers-and-cors

What you get: Cross-origin access limited to your own addresses, safe cookie flags, and the standard security headers.

Paste it into: Your AI tool, in your project

## Prompt to copy

```text
Check the browser-facing security settings of this project.

Show me what's set today for: allowed origins (flag any wildcard, especially with credentials), cookie flags on anything that holds a session (HttpOnly, Secure, SameSite), and the response headers that limit framing, content types and where scripts can load from.

Tighten them to what this app needs. List the origins that really call my API and allow only those. Add the missing headers in the one place the framework or host expects them. Introduce a content security policy in report-only mode first so nothing breaks, and tell me how to read the reports before enforcing it.
```
