This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Commit fda40bc
authored
Allow wildcard and multi domain authHost option
As described in #185 as well as #135:
- allow for wildcard domain declaration in authHost option (e.g. authHost = '.myapp.com') so one can use the laravel-echo-server with a multi tenant/subdomain system
- as well as a multi domain system, where different authentication servers are used.
The currently appropriate authentication domain is retrived from the referer and matched with the (optional: wildcard) domain declaration from the authHost option as a whitelist (which can be either an array or a string). In case none is matched with the referer, the last one in the array is taken (in case of string, the only one).
@tlaverdure @barryvdh please check. I have done my best to write this up in TS, but I don't have a compile system for this setup, so I have only tested it in vanilla JS and then afterwards added the TS specific types for this PR.
Thanks!1 parent dea0d33 commit fda40bc
1 file changed
+20
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 29 | | |
36 | | - | |
| 30 | + | |
37 | 31 | | |
38 | 32 | | |
39 | 33 | | |
| |||
47 | 41 | | |
48 | 42 | | |
49 | 43 | | |
50 | | - | |
51 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
52 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
53 | 64 | | |
54 | 65 | | |
55 | 66 | | |
| |||
0 commit comments