@sinch/functions-runtime 0.4.9 → 0.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/sinch-runtime.js +1 -0
- package/dist/bin/sinch-runtime.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -967,6 +967,8 @@ export interface FunctionContext {
|
|
|
967
967
|
requestId?: string;
|
|
968
968
|
/** Timestamp of the request */
|
|
969
969
|
timestamp?: string;
|
|
970
|
+
/** Hostname from the incoming HTTP request (e.g. `my-fn.fn-dev.sinch.com`). Present in production; absent in local dev. */
|
|
971
|
+
host?: string;
|
|
970
972
|
/** Environment variables */
|
|
971
973
|
env?: Record<string, string | undefined>;
|
|
972
974
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1277,6 +1277,7 @@ var noOpStorage = {
|
|
|
1277
1277
|
function buildBaseContext(req, config = {}) {
|
|
1278
1278
|
return {
|
|
1279
1279
|
requestId: req?.headers?.["x-request-id"] || generateRequestId(),
|
|
1280
|
+
host: req?.headers?.["host"],
|
|
1280
1281
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1281
1282
|
env: process.env,
|
|
1282
1283
|
config: {
|