Skip to content

Set path for proxy server cookie #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/litefs/mount_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ import (
"context"
"fmt"
"os/exec"

"github.com/superfly/litefs/http"
)

// MountCommand represents a command to mount the file system.
type MountCommand struct {
Config Config

ProxyServer *http.ProxyServer
}

// NewMountCommand returns a new instance of MountCommand.
Expand Down
1 change: 1 addition & 0 deletions http/proxy_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ func (s *ProxyServer) proxyToTarget(w http.ResponseWriter, r *http.Request, pass
http.SetCookie(w, &http.Cookie{
Name: TXIDCookieName,
Value: ltx.FormatTXID(pos.TXID),
Path: "/",
Expires: time.Now().Add(s.CookieExpiry),
HttpOnly: true,
})
Expand Down