Skip to content

Commit

Permalink
Merge pull request #775 from conradthegray/fix/fix-771
Browse files Browse the repository at this point in the history
fix: allow cross origin loading for graphiql
  • Loading branch information
simoneb authored Apr 25, 2022
2 parents 397949d + fbbf78a commit 49e9a50
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const importer = {
const script = document.createElement('script')
script.type = 'text/javascript'
script.src = url
script.crossOrigin = 'anonymous'
script.addEventListener('load', () => resolve(script), false)
script.addEventListener('error', (err) => reject(err), false)
document.body.appendChild(script)
Expand Down Expand Up @@ -45,6 +46,7 @@ function importDependencies () {
link.type = 'text/css'
link.rel = 'stylesheet'
link.media = 'screen,print'
link.crossOrigin = 'anonymous'
document.getElementsByTagName('head')[0].appendChild(link)

return importer.urls([
Expand Down

0 comments on commit 49e9a50

Please sign in to comment.