Skip to content

Commit

Permalink
fixed user agent for non-local apps (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafapaezbas authored Dec 20, 2024
1 parent ce5d7e3 commit e03ccb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui/gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1077,8 +1077,8 @@ class Window extends GuiCtrl {
const requestURL = new URL(details.url)
if (requestURL.host === sidecarURL.host) {
details.requestHeaders['User-Agent'] = `Pear ${this.state.id}`
} else if (this.state.userAgent) {
details.requestHeaders['User-Agent'] = this.state.userAgent
} else if (this.state?.config?.options?.userAgent) {
details.requestHeaders['User-Agent'] = this.state.config.options.userAgent
}
next({ requestHeaders: details.requestHeaders })
}
Expand Down

0 comments on commit e03ccb6

Please sign in to comment.