Skip to content

Commit

Permalink
chore: disable jsonp crossorigin option
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Dec 13, 2024
1 parent a05b830 commit e24fc36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/examples/slickgrid/Example3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export default function Example3() {
// http.get(`http://gd.geobytes.com/AutoCompleteCity?q=${searchText}`).subscribe(data => updateCallback(data));

/** with JSONP AJAX will work locally but not on the GitHub demo because of CORS */
fetchJsonp<string[]>(`http://gd.geobytes.com/AutoCompleteCity?q=${searchText}`, { crossorigin: true })
fetchJsonp<string[]>(`http://gd.geobytes.com/AutoCompleteCity?q=${searchText}`)
.then((response) => response.json())
.then((json) => updateCallback(json))
.catch((ex) => console.log('invalid JSONP response', ex));
Expand All @@ -297,7 +297,7 @@ export default function Example3() {
// http.get(`http://gd.geobytes.com/AutoCompleteCity?q=${searchText}`).subscribe(data => updateCallback(data));

/** with JSONP AJAX will work locally but not on the GitHub demo because of CORS */
fetchJsonp<string[]>(`http://gd.geobytes.com/AutoCompleteCity?q=${searchText}`, { crossorigin: true })
fetchJsonp<string[]>(`http://gd.geobytes.com/AutoCompleteCity?q=${searchText}`)
.then((response) => response.json())
.then((json) => updateCallback(json))
.catch((ex) => console.log('invalid JSONP response', ex));
Expand Down

0 comments on commit e24fc36

Please sign in to comment.