This repository was archived by the owner on Mar 25, 2021. It is now read-only.
Commit 2689890
authored
fix: Sort express mountpoints to avoid requests getting hijacked (#133)
- This commit reverse-sorts the mountpoints added to express so that
shorter mountpoints such as '/' do not hijack traffic meant for other
mountpoints e.g. '/api' or '/log'. This is not seen when running the
dev server, as the dev server config does not enable the `client`
module.
Contributes to: #42
Signed-off-by: Andrew Borley <[email protected]>1 parent 2578b77 commit 2689890
2 files changed
+23
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
80 | 93 | | |
81 | 94 | | |
82 | 95 | | |
| |||
91 | 104 | | |
92 | 105 | | |
93 | 106 | | |
94 | | - | |
95 | | - | |
| 107 | + | |
| 108 | + | |
96 | 109 | | |
97 | 110 | | |
98 | 111 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
0 commit comments