Commit 59297c5
committed
fix(api): add credentials header to cors error responses
The errorHandler middleware was missing the `Access-Control-Allow-Credentials`
header in its CORS configuration. This caused browsers to block credentialed
requests (e.g., those with an Authorization header) that resulted in an
error, leading to a specific CORS failure.
This change adds the `Access-Control-Allow-Credentials: true` header to
all error responses when the origin is allowed, resolving the issue and
allowing the client to correctly read API error messages for authenticated
or credentialed requests.1 parent 5f43537 commit 59297c5
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
0 commit comments