mirror of https://gitlab.crans.org/nounous/nixos
add option opengraph
parent
00db350a36
commit
a5ace7dd3f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue