diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2023-02-15 16:37:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-15 16:37:41 +0100 |
commit | c7535950b6de086fce741809728129c79288dee8 (patch) | |
tree | 016b274136e8f656d420f6bda79740dfc3fb09f7 /ext/flash/01_http.js | |
parent | 4104a674c7955eb7811b241b2e18453ac96faaf5 (diff) |
feat(flash): add 2nd param to handler to get remote address (#17633)
Closes #17583
Diffstat (limited to 'ext/flash/01_http.js')
-rw-r--r-- | ext/flash/01_http.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/flash/01_http.js b/ext/flash/01_http.js index 5152fd9e5..ff2eab63c 100644 --- a/ext/flash/01_http.js +++ b/ext/flash/01_http.js @@ -570,7 +570,16 @@ function createServe(opFn) { let resp; try { - resp = handler(req); + resp = handler(req, () => { + const { 0: hostname, 1: port } = core.ops.op_flash_addr( + serverId, + i, + ); + return { + hostname, + port, + }; + }); if (ObjectPrototypeIsPrototypeOf(PromisePrototype, resp)) { PromisePrototypeCatch( PromisePrototypeThen( |