Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

error when pasted into console #11

Open
CopyNinja1999 opened this issue Oct 9, 2023 · 2 comments
Open

error when pasted into console #11

CopyNinja1999 opened this issue Oct 9, 2023 · 2 comments

Comments

@CopyNinja1999
Copy link

Got this error when pasted into console

const cookie = document.cookie;
const serverUrl = "http://192.168.110.20:8080";

fetch(`${serverUrl}/set-cookie`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ cookie }),
})
  .then((res) => res.json())
  .then((res) => console.log(res))
  .catch((err) => console.log(err));
Mixed Content: The page at 'https://www.bing.com/search?q=Bing+AI&showconv=1&FORM=hpcodx' was loaded over HTTPS, but requested an insecure resource 'http://192.168.110.20:8080/set-cookie'. This request has been blocked; the content must be served over HTTPS.
@typoworx-de
Copy link

This doesn't work because of limitation to send from https://bing.com (https environment) to non-secure http! Even the original example using http://localhost -- which is in most browser not handled strict for https<>http) didn't work for me on recent google-chrom(e|ium) Browser.

If you use this in your own app/implementation simply send the cookie yourself:

POST http://192.168.110.20/set-cookie
headers: [
'Content-Type' => 'application/json'
]
data: [
'cookie' => 'MUID=0883xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
]

then fetch identifiers:
POST http://192.168.110.20//create-conversation

and with that one should be able to enter into /generation identifiers even contain parameter conversationPath which seems to have relative url-path including all required parameters.

But at least with PHP/Laravel I'm still running into 200 OK, but NO DATA response.

@typoworx-de
Copy link

Just noticed the last response for /generate was no json in my case:

data: [ERROR] Missing required parameters: conversationId, clientId, conversationSignature, text
data: [END]

So there's somewhere else the culprit for missing conversationSignature

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants