mirror of
https://github.com/rclone/rclone.git
synced 2025-02-20 07:48:33 +02:00
cache: use secure websockets for HTTPS Plex addresses
This commit is contained in:
parent
e5ff375948
commit
71b4f1ccab
2
backend/cache/plex.go
vendored
2
backend/cache/plex.go
vendored
@ -108,7 +108,7 @@ func (p *plexConnector) closeWebsocket() {
|
|||||||
|
|
||||||
func (p *plexConnector) listenWebsocket() {
|
func (p *plexConnector) listenWebsocket() {
|
||||||
u := strings.Replace(p.url.String(), "http://", "ws://", 1)
|
u := strings.Replace(p.url.String(), "http://", "ws://", 1)
|
||||||
u = strings.Replace(u, "https://", "ws://", 1)
|
u = strings.Replace(u, "https://", "wss://", 1)
|
||||||
conn, err := websocket.Dial(fmt.Sprintf(defPlexNotificationURL, strings.TrimRight(u, "/"), p.token),
|
conn, err := websocket.Dial(fmt.Sprintf(defPlexNotificationURL, strings.TrimRight(u, "/"), p.token),
|
||||||
"", "http://localhost")
|
"", "http://localhost")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user