Commit fabd57b
feat: Add redirect option (#93)
* feat: Add redirect option
This adds an option to redirect requests for directories when the
tailing slash is missing.
Fixes #92
* feat: Fix `wildcard: false` handling of other options
* Support `redirect: true` for folders which provide an index file.
* Support the `index` option.
* Fix handling of query string in root redirect with wildcard
* Document incompatibility with server option ignoreTrailingSlash.1 parent a133e38 commit fabd57b
File tree
5 files changed
+553
-11
lines changed- test
- static
5 files changed
+553
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
| |||
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
88 | 100 | | |
89 | 101 | | |
90 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| |||
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
109 | 123 | | |
110 | | - | |
| 124 | + | |
111 | 125 | | |
112 | 126 | | |
113 | 127 | | |
| 128 | + | |
| 129 | + | |
114 | 130 | | |
115 | | - | |
116 | | - | |
| 131 | + | |
| 132 | + | |
117 | 133 | | |
118 | 134 | | |
119 | 135 | | |
120 | 136 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 137 | + | |
| 138 | + | |
126 | 139 | | |
127 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
128 | 155 | | |
129 | 156 | | |
130 | 157 | | |
| |||
0 commit comments