Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

help: No URL should have a trailing slash.

Shubham Padiae0811dc2a495
diff --git a/puppet/zulip/files/nginx/zulip-include-frontend/app b/puppet/zulip/files/nginx/zulip-include-frontend/app
index 0eba08b070b..c4f1ebc21bc 100644
--- a/puppet/zulip/files/nginx/zulip-include-frontend/app
+++ b/puppet/zulip/files/nginx/zulip-include-frontend/app
@@ -27,6 +27,11 @@ location /static/ {
}
}
+# Redirect to links without the trailing slash.
+location ~ ^(/help(?:/[^/]+)*)/+$ {
+ return 301 $1$is_args$args;
+}
+
# Serve help center generated by astro/starlight.
location /help {
alias $help_alias;