laravel / reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.
https://reverb.laravel.com
MIT License
1.05k stars 76 forks source link

Allow to configure Reverb base route #103

Closed robsontenorio closed 5 months ago

robsontenorio commented 5 months ago

Currently all Reverb routes are hardcoded with /app.

This make difficult to configure Nginx reverse proxy based on location directive when you are using the same server to host your App + Laravel Reverb. Mainly because some cloud providers does not allow to expose on Internet multiples ports.

The only alternative currently is to configure as location /app/ { ... } but it is not safe and can lead to unexpected results.

Suggestion:

Add a new Reverb config like this

    'base_route' => env('REVERB_BASE_ROUTE', '/app')
joedixon commented 5 months ago

It's configured this way to allow use with Echo and the Pusher SDK so I don't think this is something we plan to change right now.