diff options
author | Rodney Lorrimar <dev@rodney.id.au> | 2017-04-23 16:26:56 +0100 |
---|---|---|
committer | Rodney Lorrimar <dev@rodney.id.au> | 2017-04-23 16:27:43 +0100 |
commit | ced172010ac7ddee063a55c67da4cd6b443d02cb (patch) | |
tree | e57928b839828aa4ba65ea8297b812cbace72721 /nixos/modules/services/misc/gogs.nix | |
parent | 0e90a05a526be87ecf8c3d8d3849bd42d1cd4539 (diff) | |
download | nixlib-ced172010ac7ddee063a55c67da4cd6b443d02cb.tar nixlib-ced172010ac7ddee063a55c67da4cd6b443d02cb.tar.gz nixlib-ced172010ac7ddee063a55c67da4cd6b443d02cb.tar.bz2 nixlib-ced172010ac7ddee063a55c67da4cd6b443d02cb.tar.lz nixlib-ced172010ac7ddee063a55c67da4cd6b443d02cb.tar.xz nixlib-ced172010ac7ddee063a55c67da4cd6b443d02cb.tar.zst nixlib-ced172010ac7ddee063a55c67da4cd6b443d02cb.zip |
gogs service: add option for enabling "secure" cookies
Diffstat (limited to 'nixos/modules/services/misc/gogs.nix')
-rw-r--r-- | nixos/modules/services/misc/gogs.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/gogs.nix b/nixos/modules/services/misc/gogs.nix index e966a50b9ec9..d42367761ab2 100644 --- a/nixos/modules/services/misc/gogs.nix +++ b/nixos/modules/services/misc/gogs.nix @@ -26,6 +26,10 @@ let HTTP_PORT = ${toString cfg.httpPort} ROOT_URL = ${cfg.rootUrl} + [session] + COOKIE_NAME = session + COOKIE_SECURE = ${boolToString cfg.cookieSecure} + [security] SECRET_KEY = #secretkey# INSTALL_LOCK = true @@ -162,6 +166,16 @@ in description = "HTTP listen port."; }; + cookieSecure = mkOption { + type = types.bool; + default = false; + description = '' + Marks session cookies as "secure," which means browsers may + ensure that the cookie is only sent under an HTTPS connection. + It's good to enable this if Gogs is being served over HTTPS. + ''; + }; + extraConfig = mkOption { type = types.str; default = ""; |