diff --git a/package.json b/package.json index 9a32118ce7..6e2b362a66 100644 --- a/package.json +++ b/package.json @@ -152,7 +152,7 @@ "proxyquire": "2.1.3", "source-map-support": "0.5.21", "superagent": "6.1.0", - "supertest": "6.2.0", + "supertest": "6.2.1", "ts-jest": "27.1.2", "ts-node": "10.4.0", "tsc-watch": "4.6.0", diff --git a/src/lib/middleware/secure-headers.ts b/src/lib/middleware/secure-headers.ts index cd5102378b..f674e97989 100644 --- a/src/lib/middleware/secure-headers.ts +++ b/src/lib/middleware/secure-headers.ts @@ -13,7 +13,7 @@ const secureHeaders: (config: IUnleashConfig) => RequestHandler = (config) => { }, contentSecurityPolicy: { directives: { - defaultSrc: ["'self'", 'cdn.getunleash.io'], + defaultSrc: ["'self'", 'cdn.getunleash.io', 'gravatar.com'], fontSrc: [ "'self'", 'cdn.getunleash.io', @@ -37,6 +37,7 @@ const secureHeaders: (config: IUnleashConfig) => RequestHandler = (config) => { ], }, }, + crossOriginEmbedderPolicy: false, }); } return (req, res, next) => { diff --git a/src/server-dev.ts b/src/server-dev.ts index 2d29a49676..f408dfaec2 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -24,6 +24,7 @@ process.nextTick(async () => { }, logLevel: LogLevel.debug, enableOAS: true, + // secureHeaders: true, versionCheck: { enable: false, }, diff --git a/website/docs/addons/addons.md b/website/docs/addons/addons.md index f39079fac6..7422ea4a70 100644 --- a/website/docs/addons/addons.md +++ b/website/docs/addons/addons.md @@ -9,10 +9,10 @@ Unleash Addons allows you to extend Unleash with new functionality. Currently, a Currently Unleash support the following Addons out of the box: -- [Webhook](./webhook) - A generic way to post messages from Unleash to third party services. -- [Slack](./slack) - Allows Unleash to post updates to Slack. -- [Microsoft Teams](./teams) - Allows Unleash to post updates to Microsoft Teams. -- [Datadog](./datadog) -allows Unleash to post Updates to Datadog when a feature toggle is updated. +- [Webhook](webhook.md) - A generic way to post messages from Unleash to third party services. +- [Slack](slack.md) - Allows Unleash to post updates to Slack. +- [Microsoft Teams](teams.md) - Allows Unleash to post updates to Microsoft Teams. +- [Datadog](datadog.md) -allows Unleash to post Updates to Datadog when a feature toggle is updated. In future releases we plan to support community built addons. diff --git a/website/docs/sdks/index.md b/website/docs/sdks/index.md index e00fda256a..128a42ae5b 100644 --- a/website/docs/sdks/index.md +++ b/website/docs/sdks/index.md @@ -70,7 +70,7 @@ If you see an item marked with a ❌ that you would find useful, feel free to re | [Gradual rollout: custom stickiness](../user_guide/activation_strategy#customize-stickiness-beta) | ✅ | ✅ | ⭕ | ✅ | ✅ | ✅ | ✅ | ✅ | | [UserID](../user_guide/activation_strategy#userids) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | [IP](../user_guide/activation_strategy#ips) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| [IP](../user_guide/activation_strategy#ips): CIDR syntax | ✅ | ✅ | ✅ | ✅ | ⭕ | ⭕ | ⭕ | ✅ | +| [IP](../user_guide/activation_strategy#ips): CIDR syntax | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | ⭕ | ✅ | | [Hostname](../user_guide/activation_strategy#hostnames) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | **Category: [Custom strategies](../advanced/custom_activation_strategy)** | | | | | | | | | | Basic support | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | @@ -99,7 +99,7 @@ If you see an item marked with a ❌ that you would find useful, feel free to re | Bootstrap from file | ✅ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | | Custom Bootstrap implementation | ✅ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | -## Clients written by awesome enthusiasts {#clients-written-by-awesome-enthusiasts} +## Community SDKs ❤️ {#community-sdks} Here's some of the fantastic work our community has done to make Unleash work in even more contexts. If you still can't find your favorite language, let us know and we'd love to help you create the client for it! @@ -113,7 +113,7 @@ Here's some of the fantastic work our community has done to make Unleash work in - [uekoetter.dev/unleash-client-dart](https://pub.dev/packages/unleash) (Dart) - _...your implementation for your favorite language._ -### Implement your own SDK {#implement-your-own-sdk} +## Implement your own SDK {#implement-your-own-sdk} If you can't find an SDK that fits your need, you can also develop your own SDK. To make implementation easier, check out these resources: diff --git a/website/docs/sdks/ruby.md b/website/docs/sdks/ruby.md index d6ecb969a9..40c87d8eb8 100644 --- a/website/docs/sdks/ruby.md +++ b/website/docs/sdks/ruby.md @@ -5,14 +5,14 @@ title: Ruby SDK > You will need your `API URL` and your `API token` in order to connect the Client SDK to you Unleash instance. You can find this information in the “Admin” section Unleash management UI. [Read more](../user_guide/api-token) -```sh - require 'unleash' +```ruby +require 'unleash' - @unleash = Unleash::Client.new( - url: '', - app_name: 'simple-test', - custom_http_headers = {'Authorization': ''}, - ) +@unleash = Unleash::Client.new( + url: '', + app_name: 'simple-test', + custom_http_headers: {'Authorization': ''}, +) ``` ### Sample usage {#sample-usage} diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 3ea88305ef..881678bb27 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -31,7 +31,7 @@ module.exports = { activeBaseRegex: '(user_guide|sdks|addons|advanced)', }, { to: 'deploy/getting_started', label: 'Deploy and manage' }, - { to: 'integrations/integrations', label: 'Integrations' }, + { to: 'integrations', label: 'Integrations' }, { to: '/api', label: 'API' }, { href: 'https://www.getunleash.io/plans', @@ -132,6 +132,7 @@ module.exports = { '/user_guide/client-sdk', '/client-sdk', '/user_guide/connect_sdk', + '/sdks/community', ], }, { @@ -146,6 +147,10 @@ module.exports = { to: '/advanced/toggle_variants', from: '/toggle_variants', }, + { + to: '/integrations', + from: '/integrations/integrations', + }, ], createRedirects: function(toPath) { if ( diff --git a/website/package.json b/website/package.json index 47b598f3c7..72e87cd358 100644 --- a/website/package.json +++ b/website/package.json @@ -14,9 +14,9 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "2.0.0-beta.9", - "@docusaurus/plugin-client-redirects": "2.0.0-beta.9", - "@docusaurus/preset-classic": "2.0.0-beta.9", + "@docusaurus/core": "2.0.0-beta.14", + "@docusaurus/plugin-client-redirects": "2.0.0-beta.14", + "@docusaurus/preset-classic": "2.0.0-beta.14", "@docusaurus/remark-plugin-npm2yarn": "2.0.0-beta.14", "@mdx-js/react": "1.6.22", "@svgr/webpack": "6.2.0", diff --git a/website/sidebars.js b/website/sidebars.js index 7a803b4929..9b05c794b6 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -29,18 +29,19 @@ module.exports = { ], 'Unleash SDKs': [ 'sdks/index', - 'sdks/java_sdk', - 'sdks/node_sdk', - 'sdks/dot_net_sdk', - 'sdks/go_sdk', - 'sdks/python_sdk', - 'sdks/ruby_sdk', - 'sdks/php_sdk', 'sdks/unleash-proxy', + 'sdks/dot_net_sdk', 'sdks/android_proxy_sdk', - 'sdks/proxy-javascript', - 'sdks/proxy-react', + 'sdks/go_sdk', 'sdks/proxy-ios', + 'sdks/java_sdk', + 'sdks/proxy-javascript', + 'sdks/node_sdk', + 'sdks/php_sdk', + 'sdks/python_sdk', + 'sdks/proxy-react', + 'sdks/ruby_sdk', + { type: 'link', label: 'Community SDKs', href: '/sdks#community-sdks'} ], Addons: [ 'addons/index', diff --git a/yarn.lock b/yarn.lock index 3b5202c159..1fde6e9035 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6722,10 +6722,10 @@ superagent@6.1.0: readable-stream "^3.6.0" semver "^7.3.2" -superagent@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/superagent/-/superagent-7.0.1.tgz" - integrity sha512-2nFiZ2ds29iRFSjZ291vq+AxqUDg8BdFeg/AObJkDpCVJX6IJT8fU7egBOkYwmxPwaDoNrNu8qRDvtAV/7ZTPw== +superagent@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/superagent/-/superagent-7.0.2.tgz#8fa6d283c9e7cd52928b96cf422356019248e8c4" + integrity sha512-2Kx35bZxLLJMBKtuXezxvD0aZQ7l923VwoCn7EtUx+aFxdG7co7PeRIddfrNtvvMuGaLZXA0mKzX+yWRhjrJ7A== dependencies: component-emitter "^1.3.0" cookiejar "^2.1.3" @@ -6739,13 +6739,13 @@ superagent@^7.0.1: readable-stream "^3.6.0" semver "^7.3.5" -supertest@6.2.0: - version "6.2.0" - resolved "https://registry.npmjs.org/supertest/-/supertest-6.2.0.tgz" - integrity sha512-JU30iTy0Utm5GbVJvrtt6RHNQECiqVl6KckEVhnR0AoGzFGq0IFMmBXnoTxYy9pM/vgufiPevjxlF39XaKn77Q== +supertest@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/supertest/-/supertest-6.2.1.tgz#add42f1afa661fa5b3083da05c6c964069768e0f" + integrity sha512-2kBKhfZgnPLmjpzB0n7A2ZnEAWTaLXq4bn3EEVY9w8rUpLyIlSusqKKvWA1Cav7hxXBnXGpxBsSeOHj5wQGe1Q== dependencies: methods "^1.1.2" - superagent "^7.0.1" + superagent "^7.0.2" supports-color@^5.3.0: version "5.5.0"