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 = {
|
locations = {
|
||||||
"/setup".extraConfig = ''
|
"/setup".extraConfig =
|
||||||
rewrite ^(.*)$ http://${hostName}/ redirect;
|
let
|
||||||
'';
|
scheme = if config.services.nginx.virtualHosts.${hostName}.forceSSL then "https" else "http";
|
||||||
|
in
|
||||||
|
''
|
||||||
|
rewrite ^(.*)$ ${scheme}://${hostName}/ redirect;
|
||||||
|
'';
|
||||||
|
|
||||||
"~ .php$" = {
|
"~ .php$" = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|
Loading…
Reference in a new issue