1.0.1 • Published 7 months ago

@webbio/strapi-plugin-userback v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Strapi plugin Userback

This Strapi plugin enables Userback feedback widget on your Strapi admin panel.

UserBack token

NOTE: If the project based token does not work -> construct the UserBack token from the Account ID, the Project ID and the Global Access Token (without the A- part).

# account_id|project_id|global_access_token_without_A_dash
USERBACK_TOKEN='12345|12345|123ABC0ABC12345ABCDEF12AB'

You can find the the account_id and project_id by inspecting the project page with the DevTools. Look for the response from the https://app.userback.io/NLI/dashboard/?_xhr=app_getData call in the "Network" tab. Use the cmd/ctrl+f search tool and search for the project name.

Plugin Config

To enable this plugin. Add it to plugins.ts

userback: {
  enabled: true,
  config: PluginConfig
}

// alternative
userback: {
    enabled: true,
    config: {
      token: env("USERBACK_TOKEN"),
    },
  },

Config type:

type PluginConfig = {
	token?: string; // Secret token for the plugin
};

Important

  • To make the script work correctly, make sure you add the 'https://api.userback.io' and 'https://static.userback.io' script-src directives to your middlewares strapi::security config. Example:
export default ({ env }) => [
	// ...
	{
		name: 'strapi::security',
		config: {
			contentSecurityPolicy: {
				// ...
				directives: {
					// ...
					'script-src': [
						// ...
						'https://api.userback.io', 'https://static.userback.io'
						// ...
					],
					// ...
					upgradeInsecureRequests: null
				}
			}
		}
	}
	// ...
];
1.0.1

7 months ago

0.1.0

7 months ago

1.0.0

7 months ago

0.2.0

7 months ago

0.0.2

9 months ago

0.0.1

9 months ago