forked from pub-solar/os
nixos/invoiceplane: detect HTTP/HTTPS scheme (a bit)
This commit is contained in:
parent
2196ed1427
commit
e4a36c87eb
|
@ -404,9 +404,13 @@ in
|
|||
'';
|
||||
|
||||
locations = {
|
||||
"/setup".extraConfig = ''
|
||||
rewrite ^(.*)$ http://${hostName}/ redirect;
|
||||
'';
|
||||
"/setup".extraConfig =
|
||||
let
|
||||
scheme = if config.services.nginx.virtualHosts.${hostName}.forceSSL then "https" else "http";
|
||||
in
|
||||
''
|
||||
rewrite ^(.*)$ ${scheme}://${hostName}/ redirect;
|
||||
'';
|
||||
|
||||
"~ .php$" = {
|
||||
extraConfig = ''
|
||||
|
|
Loading…
Reference in a new issue