bingAI: supports cors with cookies

This commit is contained in:
James Feng Cao 2023-04-03 17:51:28 +08:00
parent 37e1fae65a
commit ed2b96f46c
8 changed files with 25 additions and 18 deletions

View File

@ -68,6 +68,11 @@
</li>
</ul>
<p>which will make all git repositories on the domain visitable as websites with raw file access url.</p>
<ul>
<li>response headers, separeded by ';', Ex.:<br>
Access-Control-Allow-Origin;*;Access-Control-Allow-Credentials;true mybing2.xn--xyza.top</li>
</ul>
<p>which makes &quot;mybing2.xn--xyza.top&quot; to accept CORS requests with cookies.</p>
<p><a href="file:///data/data/info.torapp.uweb/files/default.hosts">&quot;default.hosts&quot;</a> blocks whole domain trees including all descedant domains. The domains in the hosts file must be 2 or 3 segment domains, such as &quot;yahoo.com&quot; and &quot;finance.yahoo.com&quot;. If the length of the last 2 segments is less than 7, such as &quot;com.pl&quot;, then it is treated as one segment, so domains like &quot;xxx.xxx.com.pl&quot; are also valid in the hosts file.</p>
<p>Each line of the hosts file has the following format:<br>
[rootDomain][space][regex for domain prefix before rootDomain][space][regex for the whole url without &quot;http(s)://&quot;]<br>
@ -75,7 +80,7 @@ The first part [rootDomain] is required and the others are optional. regex is ja
</div>
<p>Last Modified: 3 April 2023<br>
enhance hosts file to add attributes to domains<br>
bingAI to support cors with cookies<br>
<pre></pre>
</p>

View File

@ -51,7 +51,8 @@
<p><a href="https://releases.pagure.org/uweb/">pagure</a></p>
<h4 id="main-featuresreadmeindexhtml"><a href="../readme/index.html">Main features</a></h4>
<h4 id="change-logs">Change logs</h4>
<p>987: enhance <a href="../adblock_domain/index.html">hosts</a> file to support domain attributes, such as lifting limitations with empty ip address.<br>
<p>988: <a href="../adblock_domain/index.html">hosts</a> file to support response headers.<br>
987: enhance <a href="../adblock_domain/index.html">hosts</a> file to support domain attributes, such as lifting limitations with empty ip address.<br>
985: <a href="../links/index.html">Special urls</a> to support shortcut keys such as ctrl-a to ctrl-z.<br>
983: support <a href="../adblock_domain/index.html">&quot;hosts&quot;</a> file domain name resolving (no root needed), only single space allowed as separator for ip address and domain name.<br>
975: <a href="../bookmark/index.html">Bookmarks</a> to support styling for markdown etc.<br>
@ -78,7 +79,7 @@
</div>
<p>Last Modified: 3 April 2023<br>
enhance hosts file to add attributes to domains<br>
bingAI to support cors with cookies<br>
<pre></pre>
</p>

View File

@ -196,10 +196,10 @@ github
sourceforge
powerfolder
pagure
Main features Change logs 987: enhance hosts file to support domain attributes, such as lifting limitations with empty ip address.
Main features Change logs 988: hosts file to support response headers.
987: enhance hosts file to support domain attributes, such as lifting limitations with empty ip address.
985: Special urls to support shortcut keys such as ctrl-a to ctrl-z.
983: support &amp;quot;hosts&amp;quot; file domain name resolving (no root needed), only single space allowed as separator for ip address and domain name.
975: Bookmarks to support styling for markdown etc.</description>
983: support &amp;quot;hosts&amp;quot; file domain name resolving (no root needed), only single space allowed as separator for ip address and domain name.</description>
</item>
<item>

View File

@ -439,7 +439,7 @@ async function createChat(theChatType) {
}
try {
await copyCookies(magicUrl);
let res = await fetch(URLTrue(magicUrl, 'Create'));
let res = await fetch(URLTrue(magicUrl, 'Create'),{credentials: 'include'});
let resjson = await res.json();
if (!resjson.result) {
console.warn(resjson);

View File

@ -4,6 +4,7 @@
if("https://www.bing.com/turing/conversation/create"==url){
url = "https://mybing2.xn--xyza.top/Create";
options = {
credentials: 'include',
headers:{},
};
}

View File

@ -3,7 +3,7 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>/en/_posts/</loc>
<lastmod>2023-04-03T09:03:08+08:00</lastmod>
<lastmod>2023-04-03T17:48:42+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -29,7 +29,7 @@
/>
</url><url>
<loc>/en/</loc>
<lastmod>2023-04-03T09:06:30+08:00</lastmod>
<lastmod>2023-04-03T17:49:38+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -55,10 +55,10 @@
/>
</url><url>
<loc>/en/tags/adblock/</loc>
<lastmod>2023-04-03T09:03:08+08:00</lastmod>
<lastmod>2023-04-03T17:48:42+08:00</lastmod>
</url><url>
<loc>/en/adblock_domain/</loc>
<lastmod>2023-04-03T09:03:08+08:00</lastmod>
<lastmod>2023-04-03T17:48:42+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -71,7 +71,7 @@
/>
</url><url>
<loc>/en/tags/</loc>
<lastmod>2023-04-03T09:03:08+08:00</lastmod>
<lastmod>2023-04-03T17:48:42+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -97,7 +97,7 @@
/>
</url><url>
<loc>/en/topposts/</loc>
<lastmod>2023-04-03T08:59:00+08:00</lastmod>
<lastmod>2023-04-03T17:49:38+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -194,7 +194,7 @@
/>
</url><url>
<loc>/en/changelog/</loc>
<lastmod>2023-04-03T08:59:00+08:00</lastmod>
<lastmod>2023-04-03T17:49:38+08:00</lastmod>
</url><url>
<loc>/en/sitemap/</loc>
<lastmod>2023-02-01T09:52:11+08:00</lastmod>

View File

@ -64,10 +64,10 @@ github
sourceforge
powerfolder
pagure
Main features Change logs 987: enhance hosts file to support domain attributes, such as lifting limitations with empty ip address.
Main features Change logs 988: hosts file to support response headers.
987: enhance hosts file to support domain attributes, such as lifting limitations with empty ip address.
985: Special urls to support shortcut keys such as ctrl-a to ctrl-z.
983: support &amp;quot;hosts&amp;quot; file domain name resolving (no root needed), only single space allowed as separator for ip address and domain name.
975: Bookmarks to support styling for markdown etc.</description>
983: support &amp;quot;hosts&amp;quot; file domain name resolving (no root needed), only single space allowed as separator for ip address and domain name.</description>
</item>
<item>

View File

@ -4,7 +4,7 @@
<sitemap>
<loc>en/sitemap.xml</loc>
<lastmod>2023-04-03T09:06:30+08:00</lastmod>
<lastmod>2023-04-03T17:49:38+08:00</lastmod>
</sitemap>