Spaces:
Runtime error
Runtime error
add headers to fetch request
Browse files- templates/index.html +4 -1
templates/index.html
CHANGED
@@ -190,7 +190,10 @@
|
|
190 |
const translateText = async (jsonfile) => {
|
191 |
const fetchSettings = {
|
192 |
method: 'POST',
|
193 |
-
mode: 'no-cors',
|
|
|
|
|
|
|
194 |
};
|
195 |
const inferResponse = await fetch(`/summarize?input=${jsonfile}`, fetchSettings);
|
196 |
const inferJson = await inferResponse.json();
|
|
|
190 |
const translateText = async (jsonfile) => {
|
191 |
const fetchSettings = {
|
192 |
method: 'POST',
|
193 |
+
mode: 'no-cors',
|
194 |
+
headers: {
|
195 |
+
'Set-Cookie': 'cross-site-cookie=name; SameSite=None; Secure'
|
196 |
+
}
|
197 |
};
|
198 |
const inferResponse = await fetch(`/summarize?input=${jsonfile}`, fetchSettings);
|
199 |
const inferJson = await inferResponse.json();
|