From b9ab513157f82449baa548a7d397de474a9caed5 Mon Sep 17 00:00:00 2001 From: ClaraCrazy Date: Tue, 6 Jan 2026 14:07:58 +0100 Subject: [PATCH] [Chore]: Add API note in footer, make footer cleaner, make API opt-in If anyone reads this, msg me for a guided pentest, just a quick thing. Need to know for sure :) --- application/config.js | 4 ++-- infrastructure/web/views/_footer-main.twig | 16 ++++++++++++++++ infrastructure/web/views/layout.twig | 10 ++++------ 3 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 infrastructure/web/views/_footer-main.twig diff --git a/application/config.js b/application/config.js index fafc4b2..4820758 100644 --- a/application/config.js +++ b/application/config.js @@ -37,7 +37,7 @@ function parseBool(v) { } const config = { - apiEnabled: parseBool(process.env.HTTP_API_ENABLED) || true, + apiEnabled: parseBool(process.env.HTTP_API_ENABLED) || false, uxDebugMode: parseBool(process.env.UX_DEBUG_MODE) || false, email: { @@ -87,7 +87,7 @@ const config = { displaySort: Number(process.env.HTTP_DISPLAY_SORT) || 0, hideOther: parseBool(process.env.HTTP_HIDE_OTHER), statistics: parseBool(process.env.HTTP_STATISTICS_ENABLED) || false, - infoSection: parseBool(process.env.HTTP_SHOW_INFO_SECTION) || true + infoSection: parseBool(process.env.HTTP_SHOW_INFO_SECTION) || false } }, diff --git a/infrastructure/web/views/_footer-main.twig b/infrastructure/web/views/_footer-main.twig new file mode 100644 index 0000000..8cdbfbc --- /dev/null +++ b/infrastructure/web/views/_footer-main.twig @@ -0,0 +1,16 @@ +{# + _footer-main.twig + Usage: {% include '_footer-main.twig' %} + Expects: branding, purgeTime, mailCount, config +#} +

+ {{ branding[0] }} offered by {{ branding[1] }} | All Emails will be deleted after {{ purgeTime | raw }} + {% if config.http.features.statistics %} + | Statistics + {% else %} + | Currently handling {{ mailCount | raw }} + {% endif %} + {% if config.apiEnabled %} + | API Docs + {% endif %} +

diff --git a/infrastructure/web/views/layout.twig b/infrastructure/web/views/layout.twig index dc29f56..4a34dd4 100644 --- a/infrastructure/web/views/layout.twig +++ b/infrastructure/web/views/layout.twig @@ -101,12 +101,10 @@ {% block footer %} {% endblock %}