Skip to content

Commit 68d4a8b

Browse files
authored
Merge pull request #4 from github/credentials
Set same-origin as default
2 parents 3453c59 + a986b43 commit 68d4a8b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ async function fetchResults(remoteInput: RemoteInputElement, checkCurrentQuery:
7171
remoteInput.dispatchEvent(new CustomEvent('loadstart'))
7272
remoteInput.setAttribute('loading', '')
7373
try {
74-
const response = await fetch(url, {headers: {accept: 'text/html; fragment'}})
74+
const response = await fetch(url, {
75+
credentials: 'same-origin',
76+
headers: {accept: 'text/html; fragment'}
77+
})
7578
const html = await response.text()
7679
remoteInput.dispatchEvent(new CustomEvent('load'))
7780
resultsContainer.innerHTML = html

0 commit comments

Comments
 (0)