Skip to content

Commit

Permalink
[Fix] 🐛 Draw & Recognize Image in Cloudflare Deploy adams549659584#294
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry-zklcdc committed Jan 18, 2024
1 parent 0db6e33 commit 2a2aa6a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cloudflare/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,8 @@ export default {
});
newHeaders.set('host', targetUrl.host);
newHeaders.set('origin', BING_ORIGIN);
if (request.headers.has('referer')) {
if (request.headers.get('referer').indexOf('web/compose.html') != -1) {
newHeaders.set('referer', 'https://edgeservices.bing.com/edgesvc/compose');
}
if (request.headers.has('referer') && request.headers.get('referer').indexOf('web/compose.html') != -1) {
newHeaders.set('referer', 'https://edgeservices.bing.com/edgesvc/compose');
} else {
newHeaders.set('referer', 'https://www.bing.com/search?q=Bing+AI&showconv=1&FORM=hpcodx');
}
Expand Down

0 comments on commit 2a2aa6a

Please sign in to comment.