Skip to content

Commit 13f948b

Browse files
committed
Ensure trailing / are still redirected
1 parent df0eb9a commit 13f948b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: aws/viewer-request/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ function handler(event) {
164164
}
165165
}
166166

167+
// Redirect any paths which have trailing slashes
168+
if (path.endsWith('/')) return redirect(path.slice(0, -1));
169+
167170
// Ensure all docs sections are valid
168171
if (path.startsWith('/docs/')) {
169172
const section = path.split('/')[2];

0 commit comments

Comments
 (0)