From a5ace7dd3f1230b0c420c9991318932859239f4d Mon Sep 17 00:00:00 2001 From: Lzebulon Date: Sun, 14 Sep 2025 18:27:17 +0200 Subject: [PATCH] add option opengraph --- modules/services/reverseproxy.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/services/reverseproxy.nix b/modules/services/reverseproxy.nix index e3caa99..7ab06b1 100644 --- a/modules/services/reverseproxy.nix +++ b/modules/services/reverseproxy.nix @@ -20,6 +20,14 @@ let ]; }; + open_graph = formatJSON.generate "opengraph.json" { + openGraph = [ + enabled = true; + considerHost = true; + ttl = "24h"; + ]; + }; + mainTld = "org"; otherTld = [ "fr" @@ -73,6 +81,14 @@ in example = "/var/www/anubis.conf"; }; + anubisOpenGraph = mkOption { + type = types.bool; + default = true; + description = '' + Activer openGraph pour l'indexation et l'embedding + ''; + }; + httpOnly = mkOption { type = types.bool; default = false; @@ -128,6 +144,11 @@ in COOKIE_DOMAIN = "crans.org"; REDIRECT_DOMAINS = "${vhostName}.crans.org"; SOCKET_MODE = "0660"; + # OpenGraph config + OG_PASSTHROUGH = vhostConfig.anubisOpenGraph; + OG_EXPIRY_TIME = "24h"; + OG_CACHE_CONSIDER_HOST = true; + # Policy config POLICY_FNAME = if (vhostConfig.anubisConfig == "") then "${allowAll}" else vhostConfig.anubisConfig; }; }) cfg.virtualHosts;