Skip to content

Commit 8f35ad9

Browse files
committed
fix send error
1 parent cf9a06c commit 8f35ad9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: background.mjs

+5-1
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,15 @@ async function search_on_google_lens(image_url, tab) {
7777
image_data_form.set("encoded_image", image_data_processed);
7878
image_data_form.set("image_url", `https://${generateRandomString(12)}.com/images/${generateRandomString(12)}`); // Send fake URL
7979
image_data_form.set("sbisrc", "Chromium 98.0.4725.0 Windows");
80-
const result = await fetch(
80+
const result = await fetchPlus(
8181
`https://lens.google.com/upload?ep=ccm&s=&st=${generateRandomString(12)}`,
8282
{
8383
method: "POST",
8484
body: image_data_form,
85+
headers: {
86+
"Origin": "https://lens.google.com",
87+
"Referer": "https://lens.google.com/",
88+
}
8589
}
8690
)
8791
.then(res => {

0 commit comments

Comments
 (0)