add option opengraph

reverseproxy-google
Lzebulon 2025-09-14 18:27:17 +02:00
parent 00db350a36
commit a5ace7dd3f
No known key found for this signature in database
GPG Key ID: D6CDAB8050CBBE7D
1 changed files with 21 additions and 0 deletions

View File

@ -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;