mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-23 06:18:59 +00:00
69fb22a9e7
Remove leading slashes from captured portions of paths when redirecting using splats. This makes a directive like "/articles/* /posts/:splat 302" behave as described in FEATURES.md, i.e. "/articles/foo" now redirects to "/posts/foo" rather than to "/posts//foo". Fixes #269. This also changes the behavior of a redirect like "/articles/* /posts:splat 302". "/articles/foo" will now redirect to "/postsfoo" rather than to "/posts/foo". This change also fixes an issue where paths like "/articles123" would be incorrectly matched by the above patterns. Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/308 Reviewed-by: crapStone <codeberg@crapstone.dev> Co-authored-by: Daniel Erat <dan@erat.org> Co-committed-by: Daniel Erat <dan@erat.org> |
||
---|---|---|
.. | ||
acme | ||
cache | ||
certificates | ||
context | ||
database | ||
dns | ||
gitea | ||
handler | ||
upstream | ||
utils | ||
version | ||
startup.go |