camsong / fetch-jsonp

Make JSONP request like window.fetch
998 stars 158 forks source link

Library does not support nonce #56

Closed tylerl-ms closed 3 years ago

tylerl-ms commented 4 years ago

Hi. Library has worked great so far, but does not respect a nonce value so our Urls cannot be added to the page. i.e. when the nonce value is set, every script added to the page must use the known nonce value.

Ideally we need this added: if (options.nonce) { jsonpScript.setAttribute('nonce', options.nonce); }

Thanks! Tyler

camsong commented 3 years ago

Supported in https://github.com/camsong/fetch-jsonp/releases/tag/v1.2.0