datien228 commited on
Commit
46b779e
·
1 Parent(s): c3548cc

add headers to fetch request

Browse files
Files changed (1) hide show
  1. 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();