Skip to content

Commit

Permalink
bring back PUID
Browse files Browse the repository at this point in the history
  • Loading branch information
bi1101 committed May 31, 2024
1 parent 28d86b1 commit 66502eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/chatgpt/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ func newRequest(method string, url string, body io.Reader, secret *tokens.Secret
if secret.Token != "" {
request.Header.Set("Authorization", "Bearer "+secret.Token)
}
if secret.PUID == "" {
secret.PUID = os.Getenv("PUID")
}
if secret.PUID != "" {
request.Header.Set("Cookie", "_puid="+secret.PUID+";")
}
Expand Down

0 comments on commit 66502eb

Please sign in to comment.