1
0
mirror of synced 2025-12-25 02:17:36 -05:00

Add hostname to events (#16419)

...so that its easier to filter out localhost and herokuapp domains
This commit is contained in:
Kevin Heis
2020-11-16 09:49:12 -08:00
committed by GitHub
parent db4fad8670
commit 714ca0263b
3 changed files with 17 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ describe('POST /events', () => {
// Content information
path: '/github/docs/issues',
hostname: 'github.com',
referrer: 'https://github.com/github/docs',
search: '?q=is%3Aissue+is%3Aopen+example+',
href: 'https://github.com/github/docs/issues?q=is%3Aissue+is%3Aopen+example+',
@@ -138,6 +139,16 @@ describe('POST /events', () => {
}, 400)
)
it('should hostname be uri-reference', () =>
checkEvent({
...pageExample,
context: {
...pageExample.context,
hostname: ' '
}
}, 400)
)
it('should referrer be uri-reference', () =>
checkEvent({
...pageExample,