mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 09:35:36 +01:00
Forgot the actual check.
This commit is contained in:
parent
a4a6888248
commit
9969c9b6b1
1 changed files with 7 additions and 3 deletions
|
|
@ -3,6 +3,9 @@ import { TELEMETRY_PIXEL } from 'lib/constants';
|
||||||
export default function handler(req, res) {
|
export default function handler(req, res) {
|
||||||
const { v } = req.query;
|
const { v } = req.query;
|
||||||
res.setHeader('content-type', 'text/javascript');
|
res.setHeader('content-type', 'text/javascript');
|
||||||
|
if (process.env.DISABLE_TELEMETRY) {
|
||||||
|
res.send('/* telemetry disabled */');
|
||||||
|
} else {
|
||||||
res.send(
|
res.send(
|
||||||
`(() => {
|
`(() => {
|
||||||
const i = document.createElement('img');
|
const i = document.createElement('img');
|
||||||
|
|
@ -11,4 +14,5 @@ export default function handler(req, res) {
|
||||||
document.body.appendChild(i);
|
document.body.appendChild(i);
|
||||||
})();`,
|
})();`,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue