]> git.localhorst.tv Git - alttp.git/blob - config/websockets.php
add up to 4 player support for zsr sync
[alttp.git] / config / websockets.php
1 <?php
2
3 use BeyondCode\LaravelWebSockets\Dashboard\Http\Middleware\Authorize;
4
5 return [
6
7     /*
8      * Set a custom dashboard configuration
9      */
10     'dashboard' => [
11         'port' => env('LARAVEL_WEBSOCKETS_PORT', 6001),
12     ],
13
14     /*
15      * This package comes with multi tenancy out of the box. Here you can
16      * configure the different apps that can use the webSockets server.
17      *
18      * Optionally you specify capacity so you can limit the maximum
19      * concurrent connections for a specific app.
20      *
21      * Optionally you can disable client events so clients cannot send
22      * messages to each other via the webSockets.
23      */
24     'apps' => [
25         [
26             'id' => env('PUSHER_APP_ID'),
27             'name' => env('APP_NAME'),
28             'key' => env('PUSHER_APP_KEY'),
29             'secret' => env('PUSHER_APP_SECRET'),
30             'path' => env('PUSHER_APP_PATH'),
31             'capacity' => null,
32             'enable_client_messages' => false,
33             'enable_statistics' => false,
34         ],
35     ],
36
37     /*
38      * This class is responsible for finding the apps. The default provider
39      * will use the apps defined in this config file.
40      *
41      * You can create a custom provider by implementing the
42      * `AppProvider` interface.
43      */
44     'app_provider' => BeyondCode\LaravelWebSockets\Apps\ConfigAppProvider::class,
45
46     /*
47      * This array contains the hosts of which you want to allow incoming requests.
48      * Leave this empty if you want to accept requests from all hosts.
49      */
50     'allowed_origins' => [
51         //
52     ],
53
54     /*
55      * The maximum request size in kilobytes that is allowed for an incoming WebSocket request.
56      */
57     'max_request_size_in_kb' => 250,
58
59     /*
60      * This path will be used to register the necessary routes for the package.
61      */
62     'path' => 'laravel-websockets',
63
64     /*
65      * Dashboard Routes Middleware
66      *
67      * These middleware will be assigned to every dashboard route, giving you
68      * the chance to add your own middleware to this list or change any of
69      * the existing middleware. Or, you can simply stick with this list.
70      */
71     'middleware' => [
72         'web',
73         Authorize::class,
74     ],
75
76     'statistics' => [
77         /*
78          * This model will be used to store the statistics of the WebSocketsServer.
79          * The only requirement is that the model should extend
80          * `WebSocketsStatisticsEntry` provided by this package.
81          */
82         'model' => \BeyondCode\LaravelWebSockets\Statistics\Models\WebSocketsStatisticsEntry::class,
83
84         /**
85          * The Statistics Logger will, by default, handle the incoming statistics, store them
86          * and then release them into the database on each interval defined below.
87          */
88         'logger' => BeyondCode\LaravelWebSockets\Statistics\Logger\HttpStatisticsLogger::class,
89
90         /*
91          * Here you can specify the interval in seconds at which statistics should be logged.
92          */
93         'interval_in_seconds' => 60,
94
95         /*
96          * When the clean-command is executed, all recorded statistics older than
97          * the number of days specified here will be deleted.
98          */
99         'delete_statistics_older_than_days' => 60,
100
101         /*
102          * Use an DNS resolver to make the requests to the statistics logger
103          * default is to resolve everything to 127.0.0.1.
104          */
105         'perform_dns_lookup' => false,
106     ],
107
108     /*
109      * Define the optional SSL context for your WebSocket connections.
110      * You can see all available options at: http://php.net/manual/en/context.ssl.php
111      */
112     'ssl' => [
113         /*
114          * Path to local certificate file on filesystem. It must be a PEM encoded file which
115          * contains your certificate and private key. It can optionally contain the
116          * certificate chain of issuers. The private key also may be contained
117          * in a separate file specified by local_pk.
118          */
119         'local_cert' => env('LARAVEL_WEBSOCKETS_SSL_LOCAL_CERT', null),
120
121         /*
122          * Path to local private key file on filesystem in case of separate files for
123          * certificate (local_cert) and private key.
124          */
125         'local_pk' => env('LARAVEL_WEBSOCKETS_SSL_LOCAL_PK', null),
126
127         /*
128          * Passphrase for your local_cert file.
129          */
130         'passphrase' => env('LARAVEL_WEBSOCKETS_SSL_PASSPHRASE', null),
131     ],
132
133     /*
134      * Channel Manager
135      * This class handles how channel persistence is handled.
136      * By default, persistence is stored in an array by the running webserver.
137      * The only requirement is that the class should implement
138      * `ChannelManager` interface provided by this package.
139      */
140     'channel_manager' => \BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManagers\ArrayChannelManager::class,
141 ];