Make nextcloud redirect keep paths
Nextcloud links are commonly shared or used in other programs, and when
they have been shared in the past some of them have been
https://cloud.clicks.codes links. Our redirect caused these links to drop
their path, leading to these URLs breaking.
By keeping the path, we can avoid this issue.
Change-Id: I981c80907a56c197f68c073a916741de4276cb5b
Reviewed-on: https://git.clicks.codes/c/Infra/NixFiles/+/543
Reviewed-by: Samuel Shuert <coded@clicks.codes>
Tested-by: Skyler Grey <minion@clicks.codes>
diff --git a/modules/common/nginx-routes.nix b/modules/common/nginx-routes.nix
index db69c1f..7a6595f 100644
--- a/modules/common/nginx-routes.nix
+++ b/modules/common/nginx-routes.nix
@@ -16,7 +16,7 @@
(Hosts [
"cloud.clicks.codes"
"www.cloud.clicks.codes"
- ] (RedirectPermanent "https://nextcloud.clicks.codes"))
+ ] (Path ''~ ^/?([^\r\n]*)$'' (RedirectPermanent "https://nextcloud.clicks.codes/$1")))
(Hosts [
"erpnext.clicks.codes"
"projects.clicks.codes"