Skip to content

Commit 81cda4a

Browse files
authored
Merge pull request #15781 from github/repo-sync
repo sync
2 parents fca251f + 77c6d23 commit 81cda4a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/triage-unallowed-contributions.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ name: Check unallowed file changes
77
on:
88
pull_request_target:
99
paths:
10+
- '.devcontainer/**'
1011
- '.github/actions-scripts/**'
1112
- '.github/workflows/**'
1213
- '.github/CODEOWNERS'
@@ -54,6 +55,7 @@ jobs:
5455
openapi:
5556
- 'lib/rest/static/**'
5657
notAllowed:
58+
- '.devcontainer/**'
5759
- '.github/actions-scripts/**'
5860
- '.github/workflows/**'
5961
- '.github/CODEOWNERS'
@@ -78,6 +80,7 @@ jobs:
7880
with:
7981
script: |
8082
const badFilesArr = [
83+
'.devcontainer/**',
8184
'.github/actions-scripts/**',
8285
'.github/workflows/**',
8386
'.github/CODEOWNERS',

middleware/rate-limit.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export default rateLimit({
1616
max: 100,
1717

1818
handler: (request, response, next, options) => {
19-
const tags = [`url:${request.url}`, `ip:${request.ip}`]
19+
const ip = request.headers['x-forwarded-for'] || request.ip
20+
const tags = [`url:${request.url}`, `ip:${ip}`]
2021
statsd.increment('rate_limit', 1, tags)
2122
// NOTE! At the time of writing, the actual rate limiting is disabled!
2223
// At least we can start recording how often this happens in Datadog.

0 commit comments

Comments
 (0)