pusher-http-php
pusher-http-php copied to clipboard
Fix `path` option
Description
Pusher
class allows setting path
option, which later is used in Pusher::channels_url_prefix
to create a base_uri
for the Guzzle client. But at the moment, it doesn't work because in the constructor, the base_path
setting is set with a leading slash which means that the path in base_uri
will be overwritten and unused (source).
It needs to be working because otherwise, it's impossible to use with a server behind a proxy under "subdirectory".
E.g. Nginx configuration
location /pusher {
proxy_pass http://example:6001/
...
}
For this to work, leading slashes from the path had to be removed in all calls to Guzzle.
CHANGELOG
- [FIXED]
path
option can be used for proxied servers under "subdirectory". - [CHANGED]
base_path
's leading slash is trimmed on every call to Guzzle.
@benjamin-tang-pusher Sorry for tagging you but this PR has been open for more than a month. Could you please check this?
@benjamin-tang-pusher I got this problem too, could you please check it soon ?
Thank you very much!