Commit d9dd7a3
fix(cors): re-enable credentials on chat/form embed CORS policy (#4673)
* fix(cors): re-enable credentials on embed CORS policy
Chat and form embeds authenticate via the chat_auth_<id> / form auth
cookie set by setDeploymentAuthCookie. The previous PR set
Access-Control-Allow-Credentials: false on these routes, which made the
browser drop the auth cookie and produce 401s on subsequent embed calls
after login. Restore credentials: true (matching pre-consolidation
behavior) while keeping reflected origin and Vary: Origin.
The wildcard fallback when Origin is absent now also drops credentials
to stay CORS-spec-compliant.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* chore(cors): trim verbose comments in proxy
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* chore(cors): restore concise TSDoc on proxy CORS helpers
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent f0311a6 commit d9dd7a3
2 files changed
Lines changed: 22 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 25 | + | |
30 | 26 | | |
31 | 27 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 28 | + | |
38 | 29 | | |
39 | 30 | | |
40 | 31 | | |
| |||
79 | 70 | | |
80 | 71 | | |
81 | 72 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 73 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
96 | 83 | | |
97 | 84 | | |
98 | 85 | | |
| |||
105 | 92 | | |
106 | 93 | | |
107 | 94 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 95 | + | |
112 | 96 | | |
113 | 97 | | |
114 | 98 | | |
| |||
134 | 118 | | |
135 | 119 | | |
136 | 120 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 121 | + | |
141 | 122 | | |
142 | 123 | | |
143 | 124 | | |
| |||
0 commit comments