Add hostname to events (#16419)
...so that its easier to filter out localhost and herokuapp domains
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user