Skip to content

Commit

Permalink
Integrated Free Chat into api.createHeaders() ↞ [auto-sync from `ad…
Browse files Browse the repository at this point in the history
…amlui/chatgpt-apps`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Aug 4, 2024
1 parent 94912bf commit 4d4ac2e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.8.4.2
// @version 2024.8.4.3
// @license MIT
// @icon https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302
// @icon64 https://media.ddgpt.com/images/icons/duckduckgpt/icon64.png?af89302
Expand Down Expand Up @@ -2240,12 +2240,12 @@
createHeaders(api) {
const ip = ipv4.generate({ verbose: false })
const headers = {
'Accept': /MixerBox|OpenAI/.test(api) ? '*/*' : 'application/json, text/plain, */*',
'Accept': /Free Chat|MixerBox|OpenAI/.test(api) ? '*/*' : 'application/json, text/plain, */*',
'Accept-Encoding': 'gzip, deflate, br, zstd',
'Connection': 'keep-alive', 'Content-Type': 'application/json', 'DNT': '1',
'Host': new URL(apis[api].endpoint).hostname, 'Origin': apis[api].expectedOrigin,
'Sec-Fetch-Dest': 'empty', 'Sec-Fetch-Mode': 'cors', 'Sec-Fetch-Site': (
api == 'AIchatOS' ? 'cross-site' : api == 'MixerBox AI' ? 'same-origin' : 'same-site' ),
/AIchatOS|Free Chat/.test(api) ? 'cross-site' : api == 'MixerBox AI' ? 'same-origin' : 'same-site' ),
'TE': 'trailers', 'X-Forwarded-For': ip, 'X-Real-IP': ip
}
headers.Referer = headers.Origin + '/'
Expand Down

0 comments on commit 4d4ac2e

Please sign in to comment.