mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-09 23:24:07 -08:00
7f0d3a3043
With this PR a new text field will be added that allows setting custom html code to the `<head>` of a status page. The implementation will be similar to https://github.com/louislam/uptime-kuma/pull/2567/files, but with a multi-line text field and without escaping any special chars. For security reasons the env var `UPTIME_KUMA_ALLOW_CUSTOM_HTML` must be set to `1` to enable this feature. This will allow tracking with most analytic platforms and has been requested several times. Closes #2818
15 lines
402 B
JavaScript
15 lines
402 B
JavaScript
exports.up = function (knex) {
|
|
// Insert column for custom HTML code
|
|
return knex.schema
|
|
.alterTable("status_page", function (table) {
|
|
table.text("custom_html").nullable().defaultTo(null);
|
|
});
|
|
};
|
|
|
|
exports.down = function (knex) {
|
|
return knex.schema
|
|
.alterTable("status_page", function (table) {
|
|
table.dropColumn("custom_html");
|
|
});
|
|
};
|