Commit d4ea883
fix(excludeStaticFile): check period in last segment only, not entire path (#197)
* fix(excludeStaticFile): check period in last segment only, not entire path
The previous implementation excluded any path containing a period anywhere,
which incorrectly filtered out legitimate API routes like /my.workspace/action
or /api.v2/users.
Changes:
- Check only the final path segment for periods to identify static files
- Rename isStaticFileExcluded to shouldIncludePath for clarity
- Add inline comments explaining each condition in the logic
- Update JSDoc to clarify the detection mechanism
This correctly distinguishes between static files (/style.css) and API routes
with periods in earlier segments (/my.workspace/action).
* docs: clarify comment to describe exclusion condition rather than result
---------
Co-authored-by: Braden Wong <git@bradenwong.com>1 parent e20762e commit d4ea883
2 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
0 commit comments