mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Merge pull request #2090 from bdcorps/master
Allow embedding of "Share" dashboard as iframe
This commit is contained in:
commit
b8ef385dc6
1 changed files with 6 additions and 1 deletions
|
|
@ -2,13 +2,18 @@
|
||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
const pkg = require('./package.json');
|
const pkg = require('./package.json');
|
||||||
|
|
||||||
|
const CLOUD_URL = 'https://cloud.umami.is';
|
||||||
|
|
||||||
|
// Space-separated list of URLs that can load the "Share" dashboard, i.e. http://app.localhost:7000 https://*.vercel.app
|
||||||
|
const EMBED_HOSTED_URL = process.env.EMBED_HOSTED_URL;
|
||||||
|
|
||||||
const contentSecurityPolicy = `
|
const contentSecurityPolicy = `
|
||||||
default-src 'self';
|
default-src 'self';
|
||||||
img-src *;
|
img-src *;
|
||||||
script-src 'self' 'unsafe-eval';
|
script-src 'self' 'unsafe-eval';
|
||||||
style-src 'self' 'unsafe-inline';
|
style-src 'self' 'unsafe-inline';
|
||||||
connect-src 'self' api.umami.is;
|
connect-src 'self' api.umami.is;
|
||||||
frame-ancestors 'self';
|
frame-ancestors `self ${EMBED_HOSTED_URL}`;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const headers = [
|
const headers = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue