Compare commits

...

4 Commits

Author SHA1 Message Date
Henry 082bba69b1 revert whitelist url changes 2025-07-24 00:54:21 +01:00
Henry de760845d8 Merge branch 'main' into chore/Deny-List-URLs 2025-07-24 00:53:40 +01:00
Henry 5cbe593085 revery whitelist url changes 2025-07-24 00:52:08 +01:00
Henry e834de9f4b Refactor URL filtering logic in App class
- Introduced a denylist for URLs using the DENYLIST_URLS environment variable.
- Updated the whitelist logic to filter out denylisted URLs, ensuring improved request validation.
2025-07-23 14:04:54 +01:00
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ export class App {
// Step 2: Check if the req path is casesensitive
if (URL_CASE_SENSITIVE_REGEX.test(req.path)) {
// Step 3: Check if the req path is in the whitelist
const isWhitelisted = whitelistURLs.includes(req.path)
const isWhitelisted = whitelistURLs.some((url) => req.path.startsWith(url))
if (isWhitelisted) {
next()
} else if (req.headers['x-request-from'] === 'internal') {