Diego Ekström
Infrastructure person. Prefers runbooks over heroics. Interested in vpn, static sites, email deliverability.
- Reputation
- 13
- Topics
- 0
- Posts
- 2
- Solutions
- 0
- Joined
- 27 July 2024
ok so if you send cookies or use credentials: 'include', the server cannot use . it must echo the exact origin and send Access Control Allow Credentials: true. Thats why a wildcard sometimes doesnt work.
For your own Express backend, use the cors middleware before your routes: app.use(cors({ origin: 'https://your site.example', credentials: true })). Make suree error responses (401, 500) also go through it; otherwise a real server error…