Skip to content

Commit cc5b3a6

Browse files
authored
Set path for proxy server cookie (#304)
1 parent 5a64cf3 commit cc5b3a6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cmd/litefs/mount_darwin.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ import (
55
"context"
66
"fmt"
77
"os/exec"
8+
9+
"github.com/superfly/litefs/http"
810
)
911

1012
// MountCommand represents a command to mount the file system.
1113
type MountCommand struct {
1214
Config Config
15+
16+
ProxyServer *http.ProxyServer
1317
}
1418

1519
// NewMountCommand returns a new instance of MountCommand.

http/proxy_server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ func (s *ProxyServer) proxyToTarget(w http.ResponseWriter, r *http.Request, pass
251251
http.SetCookie(w, &http.Cookie{
252252
Name: TXIDCookieName,
253253
Value: ltx.FormatTXID(pos.TXID),
254+
Path: "/",
254255
Expires: time.Now().Add(s.CookieExpiry),
255256
HttpOnly: true,
256257
})

0 commit comments

Comments
 (0)