Commit 8db2923
authored
Fix/webchat authorized domain fail closed (#1028)
* fix(webchat): fail closed when no authorized domains are configured
isOriginAuthorized previously allowed any origin when authorizedDomains
was empty, letting the webchat widget be embedded on unintended sites
before the allow-list was ever configured. Reject cross-origin embeds
in that case; a missing origin (direct, non-embedded access) is still
allowed.
* fix(webchat): restore /webchat as a public route in proxy middleware
/webchat was excluded from the negative-lookahead matcher instead of
being listed in publicRoutes, so it never reached the auth check but
also picked up no session/tenant handling from proxy(). Move it into
publicRoutes and drop it from the matcher exclusion so it goes through
the same public-route path as the other unauthenticated surfaces
(booking, portal/redeem, etc).1 parent 22163bc commit 8db2923
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | | - | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
0 commit comments