-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom HTTP Transport #196
Comments
I haven't developed any Chrome extensions, so I'm not sure I entirely understand the situation, but... if the extension is not allowed to make a CORS request, then how would your custom HTTP transport in the extension be implemented? The HTTP code is already behind an abstraction in the SDK (since the core SDK code is shared by the browser SDK and the client-side Node and Electron SDKs, which use Node HTTP) so it's plausible that we could expose a property for plugging in a different function, but I'm unclear on how that function would work in this case. |
In my case, the custom function would effectively forward the request to the background page. This is a snippet of what our implementation looks like for our existing codebase: function sendHTTPRequestMessage(payload) {
const deferred = $.Deferred();
chrome.runtime.sendMessage({
action: 'SEND_HTTP_REQUEST',
payload,
}, ([responseType, ...args]) => {
if (responseType === 'done') {
deferred.resolve(...args);
} else {
deferred.reject(...args);
}
});
return deferred;
} What happens in the background page itself is a bit of an implementation detail, but it basically just executes the request that it was given and sends back the response. Let me know if that makes sense. |
Hmm, well... I hadn't read the Chromium docs link you provided, but now I have, and now I'm confused on a different point. At one point on that page, they say they're "removing the ability to make cross-origin requests in content scripts", period. But elsewhere it says the change "will limit content scripts to the same fetches that the page itself can perform". That would include a CORS request if the server is sending CORS headers to say that such requests are allowable— which we do. It sounds to me like they are only turning off the ability to enable CORS for certain domains that wouldn't otherwise be reachable, via the extension's permissions. Have you verified experimentally that these requests from the SDK really do not work when it's invoked from your extension? |
I haven't tested directly with the launchdarkly SDK yet (our trial expired, so waiting on billing to get unblocked), but I dug a little further and found this: Our backend sets this header for all requests, which is likely why we had to implement this despite having the appropriate CORS headers. Do you know if LaunchDarkly sets this header? If not, perhaps we might not need this. |
No, the LaunchDarkly SDK endpoints do not set any |
Cool, that sounds promising, I'll give it a try and report back. |
* Initial commit reusing withLDProvider * Added sitenav. Cleaned up filenames. * Updated readme with hooks api docs. Fixed linting errors. * Fixed linting errors. * Update README.md
* change HTTP response handling to avoid CORS header errors * don't use Promise.finally() * allow Electron and Node SDKs to report their own SDK version * apply markdown templates * markdown fixes * rename package ids * add new JS SDK test/demo page * misc doc edits * fixing merge error * fixing merge error * fix broken links on npmjs.com (#193) * update lockfiles for new packages * fix changelog formatting error that messes up the release script * Specify unpkg default target file in package.json for launchdarkly-js-client-sdk and launchdarkly-js-sdk-common. * Correct requestor call to fetch flags on a received ping event. * Implement Hooks API (#196) * Initial commit reusing withLDProvider * Added sitenav. Cleaned up filenames. * Updated readme with hooks api docs. Fixed linting errors. * Fixed linting errors. * Update README.md * bumping our lerna version to resolve transitive dependency vulnerabilities with fstream and tar (#198) * fix goals query logic for Electron, also fix handling of invalid content type * add ability to alter URL in events * Update browserPlatform definition to detect when an EventSource polyfill is available and has published that it supports setting the method used for the stream. When this is the case, the platform publishes that it supports using REPORT with EventSource and will provide the polyfill implementation if the SDK attempts a EventSource connection with the method set to REPORT. * Fix initial linter warnings. * Fix another linter warning. * fix a broken readme link (#202) * removing a stray character in the readme * fix stream reconnect logic and add stream connection logging * linter * assume logger always exists, as we do in other components * fix and simplify how the logger object is passed around * make it so eventUrlTransformer actually does something * linter * copy flags object to prevent subtle update problem in Electron * additional fix + test * make bootstrapped flags available immediately * Refactor some of the EventSource constructor selection logic. * Change browserPlatform.js to check config options when determining EventSource implementation to use. Added tests for EventSource factory in browserPlatform.js * Deal with linter. * change how supported options are detected in EventSource polyfill * fix broken homepage attributes (#209) * improve bad initialization messages (#210) * improve bad initialization messages * remove the spaces * fixing a broken link in a logged message (#212) * add jsdelivr attribute to js packages (#213) * adding an option to disable the camel-casing of flag keys (#214) * adding an option disabling the camel-casing of flag keys * update comment * update comment * fix linter errors * address pr feedback * updated readme * [ch45487] useCamelCaseFlagKeys option (#215) * Initial commit * Update initLDClient.ts * PR fixes. Added prettier. * Update withLDProvider.test.tsx * Fixed lint errors. Added test for useCamelCase false on server changes. * Removed prettier. * Re-added prettier * Update yarn.lock * Update prettier and lock files. * Fixed more linting issues. * fix a typo * use persistent anonymous user logic by default in react sdk (#216) * use persistent anonymous user logic by default in react sdk * added a comment * minor test change * missed a line * remove React package from monorepo * make link text match link * improve log format and add configurable prefix * fix test * linter * deprecate samplingInterval * linter * improve log message for stream connection failures (#221) * improve log message for stream connection failures * update the reconnection warning so that it only displays for the first set of each reconnection attempts * also test that the original put is getting called * updating tests * updating tests * Revert "updating tests" This reverts commit 84163cdf8b5af6a6e969d777b946a8a2973919ed. * better abstraction * minor change * updating the js-common readme to mention client-side node (#222) * remove common package, no more monorepo * add Releaser metadata * npm audit fix * unify Rollup config * migrate new demo code to new package structure * moved example folder * syntax fix in demo * fix directory name * fix linting * use spread operator instead of Object.assign * don't close client on beforeunload, but do flush events * typo * clarify test postconditions * misc test app improvements for testing beforeunload handler * rm unused yarn.lock * rm typedoc dependency, don't commit installation of it during release * fix paths * fix file copying logic * pr template * revert * fix programmatically reported version string * upgrade Typescript to avoid Typedoc incompatibility * Revert "upgrade Typescript to avoid Typedoc incompatibility" This reverts commit 34d9a0f. * update Babel, Jest, Rollup * remove old releaser (#229) * remove unused Rollup plugins, update dependencies * use new config validation mechanism in js-sdk-common 3.x * add image-loading event delivery logic factored out of js-sdk-common * enable diagnostic events in JS SDK * lint * fix tests * use common 3.0.0-beta2 * use 3.1.0-beta3, fix property name * lint * use js-sdk-common 3.1.0 * use js-sdk-common 3.1.1 for event payload ID fix * use js-sdk-common 3.1.2 and loosen our other dependency * fix license * use js-sdk-common 3.2.0-beta1 * SDK name should be js-client-sdk * misc fixes * use js-sdk-common 3.2.0 * use js-sdk-common 3.2.0 * standardize linting * use js-sdk-common 3.2.1 * use js-sdk-common 3.2.2 * update package-lock * update js-sdk-common dependency for initialization error bugfix * update js-sdk-common for content type bugfix; update some dev dependencies * remove unsafe usage of hasOwnProperty * use js-sdk-common 3.2.5 * resolve security vulnerability in acorn dependency (#240) * update js-sdk-common to get console logging IE bugfix * update js-sdk-common for duplicate diagnostic event fix * update js-sdk-common for TS decl fix, improve TS compilation test (#243) * bump to 3.2.9 to get startsWith fix (#244) * add option to disable sync event flush (#245) * update js-sdk-common + some dev dependencies * No longer remove non-section hash in substring and regex matching * linting * the linting target to run in CI is "lint:all", not "lint" * new js-common-sdk version (#249) * resolve node-notifier vulnerability by updating jest dep (#250) * adding contextKind to goal events, bumping js-common to get alias function (#251) * pin typedoc to unblock our releases (#252) * Removed the guides link * add inlineUsersToEvents to TypeScript defs by updating js-sdk-common * Update common JS SDK library to use fixes for debug event generation issues. * Update package lock. * use Releaser v2 config + newer CI image (#256) * Updated readme headers (#258) * don't log a warning about custom goal being unknown * lint + comment * Release js-client-sdk with the header transformation change * Updates docs link * bump js-sdk-common version for better localstorage error handling * Update launchdarkly-js-sdk-common for JSON error handling fix (sc-142333) * update lockfile Co-authored-by: Eli Bishop <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Gavin Whelan <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Yusinto Ngadiman <[email protected]> Co-authored-by: Zach Davis <[email protected]> Co-authored-by: Elliot <[email protected]> Co-authored-by: LaunchDarklyReleaseBot <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: ember-stevens <[email protected]>
* don't use Promise.finally() * allow Electron and Node SDKs to report their own SDK version * apply markdown templates * markdown fixes * rename package ids * add new JS SDK test/demo page * misc doc edits * fixing merge error * fixing merge error * fix broken links on npmjs.com (#193) * update lockfiles for new packages * fix changelog formatting error that messes up the release script * Specify unpkg default target file in package.json for launchdarkly-js-client-sdk and launchdarkly-js-sdk-common. * Correct requestor call to fetch flags on a received ping event. * Implement Hooks API (#196) * Initial commit reusing withLDProvider * Added sitenav. Cleaned up filenames. * Updated readme with hooks api docs. Fixed linting errors. * Fixed linting errors. * Update README.md * bumping our lerna version to resolve transitive dependency vulnerabilities with fstream and tar (#198) * fix goals query logic for Electron, also fix handling of invalid content type * add ability to alter URL in events * Update browserPlatform definition to detect when an EventSource polyfill is available and has published that it supports setting the method used for the stream. When this is the case, the platform publishes that it supports using REPORT with EventSource and will provide the polyfill implementation if the SDK attempts a EventSource connection with the method set to REPORT. * Fix initial linter warnings. * Fix another linter warning. * fix a broken readme link (#202) * removing a stray character in the readme * fix stream reconnect logic and add stream connection logging * linter * assume logger always exists, as we do in other components * fix and simplify how the logger object is passed around * make it so eventUrlTransformer actually does something * linter * copy flags object to prevent subtle update problem in Electron * additional fix + test * make bootstrapped flags available immediately * Refactor some of the EventSource constructor selection logic. * Change browserPlatform.js to check config options when determining EventSource implementation to use. Added tests for EventSource factory in browserPlatform.js * Deal with linter. * change how supported options are detected in EventSource polyfill * fix broken homepage attributes (#209) * improve bad initialization messages (#210) * improve bad initialization messages * remove the spaces * fixing a broken link in a logged message (#212) * add jsdelivr attribute to js packages (#213) * adding an option to disable the camel-casing of flag keys (#214) * adding an option disabling the camel-casing of flag keys * update comment * update comment * fix linter errors * address pr feedback * updated readme * [ch45487] useCamelCaseFlagKeys option (#215) * Initial commit * Update initLDClient.ts * PR fixes. Added prettier. * Update withLDProvider.test.tsx * Fixed lint errors. Added test for useCamelCase false on server changes. * Removed prettier. * Re-added prettier * Update yarn.lock * Update prettier and lock files. * Fixed more linting issues. * fix a typo * use persistent anonymous user logic by default in react sdk (#216) * use persistent anonymous user logic by default in react sdk * added a comment * minor test change * missed a line * remove React package from monorepo * make link text match link * improve log format and add configurable prefix * fix test * linter * deprecate samplingInterval * linter * improve log message for stream connection failures (#221) * improve log message for stream connection failures * update the reconnection warning so that it only displays for the first set of each reconnection attempts * also test that the original put is getting called * updating tests * updating tests * Revert "updating tests" This reverts commit 84163cdf8b5af6a6e969d777b946a8a2973919ed. * better abstraction * minor change * updating the js-common readme to mention client-side node (#222) * remove common package, no more monorepo * add Releaser metadata * npm audit fix * unify Rollup config * migrate new demo code to new package structure * moved example folder * syntax fix in demo * fix directory name * fix linting * use spread operator instead of Object.assign * don't close client on beforeunload, but do flush events * typo * clarify test postconditions * misc test app improvements for testing beforeunload handler * rm unused yarn.lock * rm typedoc dependency, don't commit installation of it during release * fix paths * fix file copying logic * pr template * revert * fix programmatically reported version string * upgrade Typescript to avoid Typedoc incompatibility * Revert "upgrade Typescript to avoid Typedoc incompatibility" This reverts commit 34d9a0f. * update Babel, Jest, Rollup * remove old releaser (#229) * remove unused Rollup plugins, update dependencies * use new config validation mechanism in js-sdk-common 3.x * add image-loading event delivery logic factored out of js-sdk-common * enable diagnostic events in JS SDK * lint * fix tests * use common 3.0.0-beta2 * use 3.1.0-beta3, fix property name * lint * use js-sdk-common 3.1.0 * use js-sdk-common 3.1.1 for event payload ID fix * use js-sdk-common 3.1.2 and loosen our other dependency * fix license * use js-sdk-common 3.2.0-beta1 * SDK name should be js-client-sdk * misc fixes * use js-sdk-common 3.2.0 * use js-sdk-common 3.2.0 * standardize linting * use js-sdk-common 3.2.1 * use js-sdk-common 3.2.2 * update package-lock * update js-sdk-common dependency for initialization error bugfix * update js-sdk-common for content type bugfix; update some dev dependencies * remove unsafe usage of hasOwnProperty * use js-sdk-common 3.2.5 * resolve security vulnerability in acorn dependency (#240) * update js-sdk-common to get console logging IE bugfix * update js-sdk-common for duplicate diagnostic event fix * update js-sdk-common for TS decl fix, improve TS compilation test (#243) * bump to 3.2.9 to get startsWith fix (#244) * add option to disable sync event flush (#245) * update js-sdk-common + some dev dependencies * No longer remove non-section hash in substring and regex matching * linting * the linting target to run in CI is "lint:all", not "lint" * new js-common-sdk version (#249) * resolve node-notifier vulnerability by updating jest dep (#250) * adding contextKind to goal events, bumping js-common to get alias function (#251) * pin typedoc to unblock our releases (#252) * Removed the guides link * add inlineUsersToEvents to TypeScript defs by updating js-sdk-common * Update common JS SDK library to use fixes for debug event generation issues. * Update package lock. * use Releaser v2 config + newer CI image (#256) * Updated readme headers (#258) * don't log a warning about custom goal being unknown * lint + comment * Release js-client-sdk with the header transformation change * Updates docs link * bump js-sdk-common version for better localstorage error handling * Update launchdarkly-js-sdk-common for JSON error handling fix (sc-142333) * update lockfile * add basicLogger export Co-authored-by: Eli Bishop <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Gavin Whelan <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Yusinto Ngadiman <[email protected]> Co-authored-by: Zach Davis <[email protected]> Co-authored-by: Elliot <[email protected]> Co-authored-by: LaunchDarklyReleaseBot <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: ember-stevens <[email protected]>
* apply markdown templates * markdown fixes * rename package ids * add new JS SDK test/demo page * misc doc edits * fixing merge error * fixing merge error * fix broken links on npmjs.com (#193) * update lockfiles for new packages * fix changelog formatting error that messes up the release script * Specify unpkg default target file in package.json for launchdarkly-js-client-sdk and launchdarkly-js-sdk-common. * Correct requestor call to fetch flags on a received ping event. * Implement Hooks API (#196) * Initial commit reusing withLDProvider * Added sitenav. Cleaned up filenames. * Updated readme with hooks api docs. Fixed linting errors. * Fixed linting errors. * Update README.md * bumping our lerna version to resolve transitive dependency vulnerabilities with fstream and tar (#198) * fix goals query logic for Electron, also fix handling of invalid content type * add ability to alter URL in events * Update browserPlatform definition to detect when an EventSource polyfill is available and has published that it supports setting the method used for the stream. When this is the case, the platform publishes that it supports using REPORT with EventSource and will provide the polyfill implementation if the SDK attempts a EventSource connection with the method set to REPORT. * Fix initial linter warnings. * Fix another linter warning. * fix a broken readme link (#202) * removing a stray character in the readme * fix stream reconnect logic and add stream connection logging * linter * assume logger always exists, as we do in other components * fix and simplify how the logger object is passed around * make it so eventUrlTransformer actually does something * linter * copy flags object to prevent subtle update problem in Electron * additional fix + test * make bootstrapped flags available immediately * Refactor some of the EventSource constructor selection logic. * Change browserPlatform.js to check config options when determining EventSource implementation to use. Added tests for EventSource factory in browserPlatform.js * Deal with linter. * change how supported options are detected in EventSource polyfill * fix broken homepage attributes (#209) * improve bad initialization messages (#210) * improve bad initialization messages * remove the spaces * fixing a broken link in a logged message (#212) * add jsdelivr attribute to js packages (#213) * adding an option to disable the camel-casing of flag keys (#214) * adding an option disabling the camel-casing of flag keys * update comment * update comment * fix linter errors * address pr feedback * updated readme * [ch45487] useCamelCaseFlagKeys option (#215) * Initial commit * Update initLDClient.ts * PR fixes. Added prettier. * Update withLDProvider.test.tsx * Fixed lint errors. Added test for useCamelCase false on server changes. * Removed prettier. * Re-added prettier * Update yarn.lock * Update prettier and lock files. * Fixed more linting issues. * fix a typo * use persistent anonymous user logic by default in react sdk (#216) * use persistent anonymous user logic by default in react sdk * added a comment * minor test change * missed a line * remove React package from monorepo * make link text match link * improve log format and add configurable prefix * fix test * linter * deprecate samplingInterval * linter * improve log message for stream connection failures (#221) * improve log message for stream connection failures * update the reconnection warning so that it only displays for the first set of each reconnection attempts * also test that the original put is getting called * updating tests * updating tests * Revert "updating tests" This reverts commit 84163cdf8b5af6a6e969d777b946a8a2973919ed. * better abstraction * minor change * updating the js-common readme to mention client-side node (#222) * remove common package, no more monorepo * add Releaser metadata * npm audit fix * unify Rollup config * migrate new demo code to new package structure * moved example folder * syntax fix in demo * fix directory name * fix linting * use spread operator instead of Object.assign * don't close client on beforeunload, but do flush events * typo * clarify test postconditions * misc test app improvements for testing beforeunload handler * rm unused yarn.lock * rm typedoc dependency, don't commit installation of it during release * fix paths * fix file copying logic * pr template * revert * fix programmatically reported version string * upgrade Typescript to avoid Typedoc incompatibility * Revert "upgrade Typescript to avoid Typedoc incompatibility" This reverts commit 34d9a0f. * update Babel, Jest, Rollup * remove old releaser (#229) * remove unused Rollup plugins, update dependencies * use new config validation mechanism in js-sdk-common 3.x * add image-loading event delivery logic factored out of js-sdk-common * enable diagnostic events in JS SDK * lint * fix tests * use common 3.0.0-beta2 * use 3.1.0-beta3, fix property name * lint * use js-sdk-common 3.1.0 * use js-sdk-common 3.1.1 for event payload ID fix * use js-sdk-common 3.1.2 and loosen our other dependency * fix license * use js-sdk-common 3.2.0-beta1 * SDK name should be js-client-sdk * misc fixes * use js-sdk-common 3.2.0 * use js-sdk-common 3.2.0 * standardize linting * use js-sdk-common 3.2.1 * use js-sdk-common 3.2.2 * update package-lock * update js-sdk-common dependency for initialization error bugfix * update js-sdk-common for content type bugfix; update some dev dependencies * remove unsafe usage of hasOwnProperty * use js-sdk-common 3.2.5 * resolve security vulnerability in acorn dependency (#240) * update js-sdk-common to get console logging IE bugfix * update js-sdk-common for duplicate diagnostic event fix * update js-sdk-common for TS decl fix, improve TS compilation test (#243) * bump to 3.2.9 to get startsWith fix (#244) * add option to disable sync event flush (#245) * update js-sdk-common + some dev dependencies * No longer remove non-section hash in substring and regex matching * linting * the linting target to run in CI is "lint:all", not "lint" * new js-common-sdk version (#249) * resolve node-notifier vulnerability by updating jest dep (#250) * adding contextKind to goal events, bumping js-common to get alias function (#251) * pin typedoc to unblock our releases (#252) * Removed the guides link * add inlineUsersToEvents to TypeScript defs by updating js-sdk-common * Update common JS SDK library to use fixes for debug event generation issues. * Update package lock. * use Releaser v2 config + newer CI image (#256) * Updated readme headers (#258) * don't log a warning about custom goal being unknown * lint + comment * Release js-client-sdk with the header transformation change * Updates docs link * bump js-sdk-common version for better localstorage error handling * Update launchdarkly-js-sdk-common for JSON error handling fix (sc-142333) * update lockfile * add basicLogger export * Update common for application tags support. (#265) * Re-remove package-lock.json and add it to the .gitignore. (#266) Co-authored-by: Eli Bishop <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Gavin Whelan <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Yusinto Ngadiman <[email protected]> Co-authored-by: Zach Davis <[email protected]> Co-authored-by: Elliot <[email protected]> Co-authored-by: LaunchDarklyReleaseBot <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: ember-stevens <[email protected]> Co-authored-by: Ryan Lamb <[email protected]>
* add new JS SDK test/demo page * misc doc edits * fixing merge error * fixing merge error * fix broken links on npmjs.com (#193) * update lockfiles for new packages * fix changelog formatting error that messes up the release script * Specify unpkg default target file in package.json for launchdarkly-js-client-sdk and launchdarkly-js-sdk-common. * Correct requestor call to fetch flags on a received ping event. * Implement Hooks API (#196) * Initial commit reusing withLDProvider * Added sitenav. Cleaned up filenames. * Updated readme with hooks api docs. Fixed linting errors. * Fixed linting errors. * Update README.md * bumping our lerna version to resolve transitive dependency vulnerabilities with fstream and tar (#198) * fix goals query logic for Electron, also fix handling of invalid content type * add ability to alter URL in events * Update browserPlatform definition to detect when an EventSource polyfill is available and has published that it supports setting the method used for the stream. When this is the case, the platform publishes that it supports using REPORT with EventSource and will provide the polyfill implementation if the SDK attempts a EventSource connection with the method set to REPORT. * Fix initial linter warnings. * Fix another linter warning. * fix a broken readme link (#202) * removing a stray character in the readme * fix stream reconnect logic and add stream connection logging * linter * assume logger always exists, as we do in other components * fix and simplify how the logger object is passed around * make it so eventUrlTransformer actually does something * linter * copy flags object to prevent subtle update problem in Electron * additional fix + test * make bootstrapped flags available immediately * Refactor some of the EventSource constructor selection logic. * Change browserPlatform.js to check config options when determining EventSource implementation to use. Added tests for EventSource factory in browserPlatform.js * Deal with linter. * change how supported options are detected in EventSource polyfill * fix broken homepage attributes (#209) * improve bad initialization messages (#210) * improve bad initialization messages * remove the spaces * fixing a broken link in a logged message (#212) * add jsdelivr attribute to js packages (#213) * adding an option to disable the camel-casing of flag keys (#214) * adding an option disabling the camel-casing of flag keys * update comment * update comment * fix linter errors * address pr feedback * updated readme * [ch45487] useCamelCaseFlagKeys option (#215) * Initial commit * Update initLDClient.ts * PR fixes. Added prettier. * Update withLDProvider.test.tsx * Fixed lint errors. Added test for useCamelCase false on server changes. * Removed prettier. * Re-added prettier * Update yarn.lock * Update prettier and lock files. * Fixed more linting issues. * fix a typo * use persistent anonymous user logic by default in react sdk (#216) * use persistent anonymous user logic by default in react sdk * added a comment * minor test change * missed a line * remove React package from monorepo * make link text match link * improve log format and add configurable prefix * fix test * linter * deprecate samplingInterval * linter * improve log message for stream connection failures (#221) * improve log message for stream connection failures * update the reconnection warning so that it only displays for the first set of each reconnection attempts * also test that the original put is getting called * updating tests * updating tests * Revert "updating tests" This reverts commit 84163cdf8b5af6a6e969d777b946a8a2973919ed. * better abstraction * minor change * updating the js-common readme to mention client-side node (#222) * remove common package, no more monorepo * add Releaser metadata * npm audit fix * unify Rollup config * migrate new demo code to new package structure * moved example folder * syntax fix in demo * fix directory name * fix linting * use spread operator instead of Object.assign * don't close client on beforeunload, but do flush events * typo * clarify test postconditions * misc test app improvements for testing beforeunload handler * rm unused yarn.lock * rm typedoc dependency, don't commit installation of it during release * fix paths * fix file copying logic * pr template * revert * fix programmatically reported version string * upgrade Typescript to avoid Typedoc incompatibility * Revert "upgrade Typescript to avoid Typedoc incompatibility" This reverts commit 34d9a0f. * update Babel, Jest, Rollup * remove old releaser (#229) * remove unused Rollup plugins, update dependencies * use new config validation mechanism in js-sdk-common 3.x * add image-loading event delivery logic factored out of js-sdk-common * enable diagnostic events in JS SDK * lint * fix tests * use common 3.0.0-beta2 * use 3.1.0-beta3, fix property name * lint * use js-sdk-common 3.1.0 * use js-sdk-common 3.1.1 for event payload ID fix * use js-sdk-common 3.1.2 and loosen our other dependency * fix license * use js-sdk-common 3.2.0-beta1 * SDK name should be js-client-sdk * misc fixes * use js-sdk-common 3.2.0 * use js-sdk-common 3.2.0 * standardize linting * use js-sdk-common 3.2.1 * use js-sdk-common 3.2.2 * update package-lock * update js-sdk-common dependency for initialization error bugfix * update js-sdk-common for content type bugfix; update some dev dependencies * remove unsafe usage of hasOwnProperty * use js-sdk-common 3.2.5 * resolve security vulnerability in acorn dependency (#240) * update js-sdk-common to get console logging IE bugfix * update js-sdk-common for duplicate diagnostic event fix * update js-sdk-common for TS decl fix, improve TS compilation test (#243) * bump to 3.2.9 to get startsWith fix (#244) * add option to disable sync event flush (#245) * update js-sdk-common + some dev dependencies * No longer remove non-section hash in substring and regex matching * linting * the linting target to run in CI is "lint:all", not "lint" * new js-common-sdk version (#249) * resolve node-notifier vulnerability by updating jest dep (#250) * adding contextKind to goal events, bumping js-common to get alias function (#251) * pin typedoc to unblock our releases (#252) * Removed the guides link * add inlineUsersToEvents to TypeScript defs by updating js-sdk-common * Update common JS SDK library to use fixes for debug event generation issues. * Update package lock. * use Releaser v2 config + newer CI image (#256) * Updated readme headers (#258) * don't log a warning about custom goal being unknown * lint + comment * Release js-client-sdk with the header transformation change * Updates docs link * bump js-sdk-common version for better localstorage error handling * Update launchdarkly-js-sdk-common for JSON error handling fix (sc-142333) * update lockfile * add basicLogger export * Update common for application tags support. (#265) * Re-remove package-lock.json and add it to the .gitignore. (#266) * Use a combination of dependencies that is compatible. (#269) (#270) * Update js-sdk-common to 3.7.0 (#271) Co-authored-by: Eli Bishop <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Gavin Whelan <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Yusinto Ngadiman <[email protected]> Co-authored-by: Zach Davis <[email protected]> Co-authored-by: Elliot <[email protected]> Co-authored-by: LaunchDarklyReleaseBot <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: ember-stevens <[email protected]> Co-authored-by: Ryan Lamb <[email protected]>
* fixing merge error * fixing merge error * fix broken links on npmjs.com (#193) * update lockfiles for new packages * fix changelog formatting error that messes up the release script * Specify unpkg default target file in package.json for launchdarkly-js-client-sdk and launchdarkly-js-sdk-common. * Correct requestor call to fetch flags on a received ping event. * Implement Hooks API (#196) * Initial commit reusing withLDProvider * Added sitenav. Cleaned up filenames. * Updated readme with hooks api docs. Fixed linting errors. * Fixed linting errors. * Update README.md * bumping our lerna version to resolve transitive dependency vulnerabilities with fstream and tar (#198) * fix goals query logic for Electron, also fix handling of invalid content type * add ability to alter URL in events * Update browserPlatform definition to detect when an EventSource polyfill is available and has published that it supports setting the method used for the stream. When this is the case, the platform publishes that it supports using REPORT with EventSource and will provide the polyfill implementation if the SDK attempts a EventSource connection with the method set to REPORT. * Fix initial linter warnings. * Fix another linter warning. * fix a broken readme link (#202) * removing a stray character in the readme * fix stream reconnect logic and add stream connection logging * linter * assume logger always exists, as we do in other components * fix and simplify how the logger object is passed around * make it so eventUrlTransformer actually does something * linter * copy flags object to prevent subtle update problem in Electron * additional fix + test * make bootstrapped flags available immediately * Refactor some of the EventSource constructor selection logic. * Change browserPlatform.js to check config options when determining EventSource implementation to use. Added tests for EventSource factory in browserPlatform.js * Deal with linter. * change how supported options are detected in EventSource polyfill * fix broken homepage attributes (#209) * improve bad initialization messages (#210) * improve bad initialization messages * remove the spaces * fixing a broken link in a logged message (#212) * add jsdelivr attribute to js packages (#213) * adding an option to disable the camel-casing of flag keys (#214) * adding an option disabling the camel-casing of flag keys * update comment * update comment * fix linter errors * address pr feedback * updated readme * [ch45487] useCamelCaseFlagKeys option (#215) * Initial commit * Update initLDClient.ts * PR fixes. Added prettier. * Update withLDProvider.test.tsx * Fixed lint errors. Added test for useCamelCase false on server changes. * Removed prettier. * Re-added prettier * Update yarn.lock * Update prettier and lock files. * Fixed more linting issues. * fix a typo * use persistent anonymous user logic by default in react sdk (#216) * use persistent anonymous user logic by default in react sdk * added a comment * minor test change * missed a line * remove React package from monorepo * make link text match link * improve log format and add configurable prefix * fix test * linter * deprecate samplingInterval * linter * improve log message for stream connection failures (#221) * improve log message for stream connection failures * update the reconnection warning so that it only displays for the first set of each reconnection attempts * also test that the original put is getting called * updating tests * updating tests * Revert "updating tests" This reverts commit 84163cdf8b5af6a6e969d777b946a8a2973919ed. * better abstraction * minor change * updating the js-common readme to mention client-side node (#222) * remove common package, no more monorepo * add Releaser metadata * npm audit fix * unify Rollup config * migrate new demo code to new package structure * moved example folder * syntax fix in demo * fix directory name * fix linting * use spread operator instead of Object.assign * don't close client on beforeunload, but do flush events * typo * clarify test postconditions * misc test app improvements for testing beforeunload handler * rm unused yarn.lock * rm typedoc dependency, don't commit installation of it during release * fix paths * fix file copying logic * pr template * revert * fix programmatically reported version string * upgrade Typescript to avoid Typedoc incompatibility * Revert "upgrade Typescript to avoid Typedoc incompatibility" This reverts commit 34d9a0f. * update Babel, Jest, Rollup * remove old releaser (#229) * remove unused Rollup plugins, update dependencies * use new config validation mechanism in js-sdk-common 3.x * add image-loading event delivery logic factored out of js-sdk-common * enable diagnostic events in JS SDK * lint * fix tests * use common 3.0.0-beta2 * use 3.1.0-beta3, fix property name * lint * use js-sdk-common 3.1.0 * use js-sdk-common 3.1.1 for event payload ID fix * use js-sdk-common 3.1.2 and loosen our other dependency * fix license * use js-sdk-common 3.2.0-beta1 * SDK name should be js-client-sdk * misc fixes * use js-sdk-common 3.2.0 * use js-sdk-common 3.2.0 * standardize linting * use js-sdk-common 3.2.1 * use js-sdk-common 3.2.2 * update package-lock * update js-sdk-common dependency for initialization error bugfix * update js-sdk-common for content type bugfix; update some dev dependencies * remove unsafe usage of hasOwnProperty * use js-sdk-common 3.2.5 * resolve security vulnerability in acorn dependency (#240) * update js-sdk-common to get console logging IE bugfix * update js-sdk-common for duplicate diagnostic event fix * update js-sdk-common for TS decl fix, improve TS compilation test (#243) * bump to 3.2.9 to get startsWith fix (#244) * add option to disable sync event flush (#245) * update js-sdk-common + some dev dependencies * No longer remove non-section hash in substring and regex matching * linting * the linting target to run in CI is "lint:all", not "lint" * new js-common-sdk version (#249) * resolve node-notifier vulnerability by updating jest dep (#250) * adding contextKind to goal events, bumping js-common to get alias function (#251) * pin typedoc to unblock our releases (#252) * Removed the guides link * add inlineUsersToEvents to TypeScript defs by updating js-sdk-common * Update common JS SDK library to use fixes for debug event generation issues. * Update package lock. * use Releaser v2 config + newer CI image (#256) * Updated readme headers (#258) * don't log a warning about custom goal being unknown * lint + comment * Release js-client-sdk with the header transformation change * Updates docs link * bump js-sdk-common version for better localstorage error handling * Update launchdarkly-js-sdk-common for JSON error handling fix (sc-142333) * update lockfile * add basicLogger export * Update common for application tags support. (#265) * Re-remove package-lock.json and add it to the .gitignore. (#266) * Use a combination of dependencies that is compatible. (#269) (#270) * Update js-sdk-common to 3.7.0 (#271) * Update node version used during release. (#272) * Update common to 3.8.1 (#273) Co-authored-by: Eli Bishop <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Gavin Whelan <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Yusinto Ngadiman <[email protected]> Co-authored-by: Zach Davis <[email protected]> Co-authored-by: Elliot <[email protected]> Co-authored-by: LaunchDarklyReleaseBot <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: ember-stevens <[email protected]> Co-authored-by: Ryan Lamb <[email protected]>
* fixing merge error * fixing merge error * fix broken links on npmjs.com (#193) * update lockfiles for new packages * fix changelog formatting error that messes up the release script * Specify unpkg default target file in package.json for launchdarkly-js-client-sdk and launchdarkly-js-sdk-common. * Correct requestor call to fetch flags on a received ping event. * Implement Hooks API (#196) * Initial commit reusing withLDProvider * Added sitenav. Cleaned up filenames. * Updated readme with hooks api docs. Fixed linting errors. * Fixed linting errors. * Update README.md * bumping our lerna version to resolve transitive dependency vulnerabilities with fstream and tar (#198) * fix goals query logic for Electron, also fix handling of invalid content type * add ability to alter URL in events * Update browserPlatform definition to detect when an EventSource polyfill is available and has published that it supports setting the method used for the stream. When this is the case, the platform publishes that it supports using REPORT with EventSource and will provide the polyfill implementation if the SDK attempts a EventSource connection with the method set to REPORT. * Fix initial linter warnings. * Fix another linter warning. * fix a broken readme link (#202) * removing a stray character in the readme * fix stream reconnect logic and add stream connection logging * linter * assume logger always exists, as we do in other components * fix and simplify how the logger object is passed around * make it so eventUrlTransformer actually does something * linter * copy flags object to prevent subtle update problem in Electron * additional fix + test * make bootstrapped flags available immediately * Refactor some of the EventSource constructor selection logic. * Change browserPlatform.js to check config options when determining EventSource implementation to use. Added tests for EventSource factory in browserPlatform.js * Deal with linter. * change how supported options are detected in EventSource polyfill * fix broken homepage attributes (#209) * improve bad initialization messages (#210) * improve bad initialization messages * remove the spaces * fixing a broken link in a logged message (#212) * add jsdelivr attribute to js packages (#213) * adding an option to disable the camel-casing of flag keys (#214) * adding an option disabling the camel-casing of flag keys * update comment * update comment * fix linter errors * address pr feedback * updated readme * [ch45487] useCamelCaseFlagKeys option (#215) * Initial commit * Update initLDClient.ts * PR fixes. Added prettier. * Update withLDProvider.test.tsx * Fixed lint errors. Added test for useCamelCase false on server changes. * Removed prettier. * Re-added prettier * Update yarn.lock * Update prettier and lock files. * Fixed more linting issues. * fix a typo * use persistent anonymous user logic by default in react sdk (#216) * use persistent anonymous user logic by default in react sdk * added a comment * minor test change * missed a line * remove React package from monorepo * make link text match link * improve log format and add configurable prefix * fix test * linter * deprecate samplingInterval * linter * improve log message for stream connection failures (#221) * improve log message for stream connection failures * update the reconnection warning so that it only displays for the first set of each reconnection attempts * also test that the original put is getting called * updating tests * updating tests * Revert "updating tests" This reverts commit 84163cdf8b5af6a6e969d777b946a8a2973919ed. * better abstraction * minor change * updating the js-common readme to mention client-side node (#222) * remove common package, no more monorepo * add Releaser metadata * npm audit fix * unify Rollup config * migrate new demo code to new package structure * moved example folder * syntax fix in demo * fix directory name * fix linting * use spread operator instead of Object.assign * don't close client on beforeunload, but do flush events * typo * clarify test postconditions * misc test app improvements for testing beforeunload handler * rm unused yarn.lock * rm typedoc dependency, don't commit installation of it during release * fix paths * fix file copying logic * pr template * revert * fix programmatically reported version string * upgrade Typescript to avoid Typedoc incompatibility * Revert "upgrade Typescript to avoid Typedoc incompatibility" This reverts commit 34d9a0f. * update Babel, Jest, Rollup * remove old releaser (#229) * remove unused Rollup plugins, update dependencies * use new config validation mechanism in js-sdk-common 3.x * add image-loading event delivery logic factored out of js-sdk-common * enable diagnostic events in JS SDK * lint * fix tests * use common 3.0.0-beta2 * use 3.1.0-beta3, fix property name * lint * use js-sdk-common 3.1.0 * use js-sdk-common 3.1.1 for event payload ID fix * use js-sdk-common 3.1.2 and loosen our other dependency * fix license * use js-sdk-common 3.2.0-beta1 * SDK name should be js-client-sdk * misc fixes * use js-sdk-common 3.2.0 * use js-sdk-common 3.2.0 * standardize linting * use js-sdk-common 3.2.1 * use js-sdk-common 3.2.2 * update package-lock * update js-sdk-common dependency for initialization error bugfix * update js-sdk-common for content type bugfix; update some dev dependencies * remove unsafe usage of hasOwnProperty * use js-sdk-common 3.2.5 * resolve security vulnerability in acorn dependency (#240) * update js-sdk-common to get console logging IE bugfix * update js-sdk-common for duplicate diagnostic event fix * update js-sdk-common for TS decl fix, improve TS compilation test (#243) * bump to 3.2.9 to get startsWith fix (#244) * add option to disable sync event flush (#245) * update js-sdk-common + some dev dependencies * No longer remove non-section hash in substring and regex matching * linting * the linting target to run in CI is "lint:all", not "lint" * new js-common-sdk version (#249) * resolve node-notifier vulnerability by updating jest dep (#250) * adding contextKind to goal events, bumping js-common to get alias function (#251) * pin typedoc to unblock our releases (#252) * Removed the guides link * add inlineUsersToEvents to TypeScript defs by updating js-sdk-common * Update common JS SDK library to use fixes for debug event generation issues. * Update package lock. * use Releaser v2 config + newer CI image (#256) * Updated readme headers (#258) * don't log a warning about custom goal being unknown * lint + comment * Release js-client-sdk with the header transformation change * Updates docs link * bump js-sdk-common version for better localstorage error handling * Update launchdarkly-js-sdk-common for JSON error handling fix (sc-142333) * update lockfile * add basicLogger export * Update common for application tags support. (#265) * Re-remove package-lock.json and add it to the .gitignore. (#266) * Use a combination of dependencies that is compatible. (#269) (#270) * Update js-sdk-common to 3.7.0 (#271) * Update node version used during release. (#272) * Update common to 3.8.1 (#273) * Update common version for jitter and backoff. (#274) Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Eli Bishop <[email protected]> Co-authored-by: Gavin Whelan <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Yusinto Ngadiman <[email protected]> Co-authored-by: Zach Davis <[email protected]> Co-authored-by: Elliot <[email protected]> Co-authored-by: LaunchDarklyReleaseBot <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: ember-stevens <[email protected]> Co-authored-by: Ryan Lamb <[email protected]>
* fixing merge error * fixing merge error * fix broken links on npmjs.com (#193) * update lockfiles for new packages * fix changelog formatting error that messes up the release script * Specify unpkg default target file in package.json for launchdarkly-js-client-sdk and launchdarkly-js-sdk-common. * Correct requestor call to fetch flags on a received ping event. * Implement Hooks API (#196) * Initial commit reusing withLDProvider * Added sitenav. Cleaned up filenames. * Updated readme with hooks api docs. Fixed linting errors. * Fixed linting errors. * Update README.md * bumping our lerna version to resolve transitive dependency vulnerabilities with fstream and tar (#198) * fix goals query logic for Electron, also fix handling of invalid content type * add ability to alter URL in events * Update browserPlatform definition to detect when an EventSource polyfill is available and has published that it supports setting the method used for the stream. When this is the case, the platform publishes that it supports using REPORT with EventSource and will provide the polyfill implementation if the SDK attempts a EventSource connection with the method set to REPORT. * Fix initial linter warnings. * Fix another linter warning. * fix a broken readme link (#202) * removing a stray character in the readme * fix stream reconnect logic and add stream connection logging * linter * assume logger always exists, as we do in other components * fix and simplify how the logger object is passed around * make it so eventUrlTransformer actually does something * linter * copy flags object to prevent subtle update problem in Electron * additional fix + test * make bootstrapped flags available immediately * Refactor some of the EventSource constructor selection logic. * Change browserPlatform.js to check config options when determining EventSource implementation to use. Added tests for EventSource factory in browserPlatform.js * Deal with linter. * change how supported options are detected in EventSource polyfill * fix broken homepage attributes (#209) * improve bad initialization messages (#210) * improve bad initialization messages * remove the spaces * fixing a broken link in a logged message (#212) * add jsdelivr attribute to js packages (#213) * adding an option to disable the camel-casing of flag keys (#214) * adding an option disabling the camel-casing of flag keys * update comment * update comment * fix linter errors * address pr feedback * updated readme * [ch45487] useCamelCaseFlagKeys option (#215) * Initial commit * Update initLDClient.ts * PR fixes. Added prettier. * Update withLDProvider.test.tsx * Fixed lint errors. Added test for useCamelCase false on server changes. * Removed prettier. * Re-added prettier * Update yarn.lock * Update prettier and lock files. * Fixed more linting issues. * fix a typo * use persistent anonymous user logic by default in react sdk (#216) * use persistent anonymous user logic by default in react sdk * added a comment * minor test change * missed a line * remove React package from monorepo * make link text match link * improve log format and add configurable prefix * fix test * linter * deprecate samplingInterval * linter * improve log message for stream connection failures (#221) * improve log message for stream connection failures * update the reconnection warning so that it only displays for the first set of each reconnection attempts * also test that the original put is getting called * updating tests * updating tests * Revert "updating tests" This reverts commit 84163cdf8b5af6a6e969d777b946a8a2973919ed. * better abstraction * minor change * updating the js-common readme to mention client-side node (#222) * remove common package, no more monorepo * add Releaser metadata * npm audit fix * unify Rollup config * migrate new demo code to new package structure * moved example folder * syntax fix in demo * fix directory name * fix linting * use spread operator instead of Object.assign * don't close client on beforeunload, but do flush events * typo * clarify test postconditions * misc test app improvements for testing beforeunload handler * rm unused yarn.lock * rm typedoc dependency, don't commit installation of it during release * fix paths * fix file copying logic * pr template * revert * fix programmatically reported version string * upgrade Typescript to avoid Typedoc incompatibility * Revert "upgrade Typescript to avoid Typedoc incompatibility" This reverts commit 34d9a0f. * update Babel, Jest, Rollup * remove old releaser (#229) * remove unused Rollup plugins, update dependencies * use new config validation mechanism in js-sdk-common 3.x * add image-loading event delivery logic factored out of js-sdk-common * enable diagnostic events in JS SDK * lint * fix tests * use common 3.0.0-beta2 * use 3.1.0-beta3, fix property name * lint * use js-sdk-common 3.1.0 * use js-sdk-common 3.1.1 for event payload ID fix * use js-sdk-common 3.1.2 and loosen our other dependency * fix license * use js-sdk-common 3.2.0-beta1 * SDK name should be js-client-sdk * misc fixes * use js-sdk-common 3.2.0 * use js-sdk-common 3.2.0 * standardize linting * use js-sdk-common 3.2.1 * use js-sdk-common 3.2.2 * update package-lock * update js-sdk-common dependency for initialization error bugfix * update js-sdk-common for content type bugfix; update some dev dependencies * remove unsafe usage of hasOwnProperty * use js-sdk-common 3.2.5 * resolve security vulnerability in acorn dependency (#240) * update js-sdk-common to get console logging IE bugfix * update js-sdk-common for duplicate diagnostic event fix * update js-sdk-common for TS decl fix, improve TS compilation test (#243) * bump to 3.2.9 to get startsWith fix (#244) * add option to disable sync event flush (#245) * update js-sdk-common + some dev dependencies * No longer remove non-section hash in substring and regex matching * linting * the linting target to run in CI is "lint:all", not "lint" * new js-common-sdk version (#249) * resolve node-notifier vulnerability by updating jest dep (#250) * adding contextKind to goal events, bumping js-common to get alias function (#251) * pin typedoc to unblock our releases (#252) * Removed the guides link * add inlineUsersToEvents to TypeScript defs by updating js-sdk-common * Update common JS SDK library to use fixes for debug event generation issues. * Update package lock. * use Releaser v2 config + newer CI image (#256) * Updated readme headers (#258) * don't log a warning about custom goal being unknown * lint + comment * Release js-client-sdk with the header transformation change * Updates docs link * bump js-sdk-common version for better localstorage error handling * Update launchdarkly-js-sdk-common for JSON error handling fix (sc-142333) * update lockfile * add basicLogger export * Update common for application tags support. (#265) * Re-remove package-lock.json and add it to the .gitignore. (#266) * Use a combination of dependencies that is compatible. (#269) (#270) * Update js-sdk-common to 3.7.0 (#271) * Update node version used during release. (#272) * Update common to 3.8.1 (#273) * Update common version for jitter and backoff. (#274) * Update typedoc and make associated documentation changes. (#275) Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Ben Woskow <[email protected]> Co-authored-by: Eli Bishop <[email protected]> Co-authored-by: Gavin Whelan <[email protected]> Co-authored-by: LaunchDarklyCI <[email protected]> Co-authored-by: Yusinto Ngadiman <[email protected]> Co-authored-by: Zach Davis <[email protected]> Co-authored-by: Elliot <[email protected]> Co-authored-by: LaunchDarklyReleaseBot <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Louis Chan <[email protected]> Co-authored-by: Ember Stevens <[email protected]> Co-authored-by: ember-stevens <[email protected]> Co-authored-by: Ryan Lamb <[email protected]>
I'd like to implement LaunchDarkly into a chrome extension. However, due to recent changes in chromium, cross-origin requests can no longer be made from the content scripts that are injected into pages. Instead, we have to make requests from the background page and relay them to the content scripts. I've built a whole mechanism for this already for our existing API calls.
My first thought was implementing LD in the background page and creating an analogous relaying system, but it would be nice if I could just implement it directly in the content scripts and simply configure how the underlying API call is made (i.e. a custom HTTP transport). I'm not interested in the streaming API, I just want access to the variations.
As far as I can tell, there's no functionality for this today. Would this be something that's viable to implement?
The text was updated successfully, but these errors were encountered: