gogs service: add option for enabling "secure" cookies
This commit is contained in:
parent
0e90a05a52
commit
ced172010a
@ -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 = "";
|
||||
|
Loading…
Reference in New Issue
Block a user