We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d3d2c3b commit b791fb0Copy full SHA for b791fb0
src/index.ts
@@ -9,7 +9,10 @@ export const eventHandler = async (
9
) => {
10
const { payload, client } = event
11
12
- const { writeKey, hostname = 'api.segment.io' } = settings
+ let { writeKey, hostname = 'api.segment.io' } = settings
13
+ if (payload.hostname) {
14
+ hostname = payload.hostname
15
+ }
16
const endpoint = `https://${hostname}/v1/${eventType}`
17
18
// Prepare new payload
0 commit comments