Split redirect to remove permanent argument
Context for this change: I have just spent well over an hour looking for the
error in our code, only to find out that it was a missing "true". I am entirely
fed up at this point and want to be completely certain that this can never
happen again. Only having a single parameter here means that we cannot believe
we have specified all parameters (as the "to" is obvious if you miss it)
Change-Id: I1c887582456bdd9a2fa12a135b36159ae5141801
diff --git a/nginx.nix b/nginx.nix
index 316a294..a808c8e 100644
--- a/nginx.nix
+++ b/nginx.nix
@@ -35,8 +35,14 @@
inherit root socket;
type = "php";
};
- Redirect = to: permanent: {
- inherit to permanent;
+ Redirect = to: {
+ inherit to;
+ permanent = false;
+ type = "redirect";
+ };
+ RedirectPermanent = to: {
+ inherit to;
+ permanent = true;
type = "redirect";
};
Directory = root: {