-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pong2 #9775
Conversation
this refactors the pong lib: - bundle click.js, get.js, viewed.js in pong.js - add pong2.js based on bsa's api - remove fallback
}; | ||
|
||
export default function anonymousIpByCC(countryCode) { | ||
return cc2ip[countryCode] ?? "127.0.0.1"; | ||
return cc2ip[countryCode] ?? "10.10.10.10"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IPs and fallback was provided by BSA.
@@ -37,8 +37,8 @@ | |||
proxyApi | |||
); | |||
router.all("/submit/mdn-yari/*", requireOrigin(Origin.main), proxyTelemetry); | |||
router.all("/pong/*", requireOrigin(Origin.main), express.json(), proxyKevel); | |||
router.all("/pimg/*", requireOrigin(Origin.main), proxyKevel); | |||
router.all("/pong/*", requireOrigin(Origin.main), express.json(), proxyPong); |
Check failure
Code scanning / CodeQL
Missing rate limiting High
authorization
This route handler performs
authorization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing actually seems like a bug (the copy
-> description
suggestion), the rest is relatively nitty - looks good!
libs/pong/pong2.js
Outdated
}, | ||
}; | ||
}); | ||
const decisionRes = await Promise.all(requests); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want all placements to fail if just one does, might Promise.allSettled
be more appropriate here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a version in the payload to route as the click will not have the referrer set. We'll remove this after the migration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good, attempted to test on stage but I don't think these latest changes have been deployed there?
Summary
Remove unused Carbon fallback and support BSA.
How did you test this change?
Staging.